mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
2611 lines
110 KiB
Go
2611 lines
110 KiB
Go
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
|
// source: headscale/v1/headscale.proto
|
|
|
|
/*
|
|
Package v1 is a reverse proxy.
|
|
|
|
It translates gRPC into RESTful JSON APIs.
|
|
*/
|
|
package v1
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"net/http"
|
|
|
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
|
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
|
"google.golang.org/grpc"
|
|
"google.golang.org/grpc/codes"
|
|
"google.golang.org/grpc/grpclog"
|
|
"google.golang.org/grpc/metadata"
|
|
"google.golang.org/grpc/status"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// Suppress "imported and not used" errors
|
|
var _ codes.Code
|
|
var _ io.Reader
|
|
var _ status.Status
|
|
var _ = runtime.String
|
|
var _ = utilities.NewDoubleArray
|
|
var _ = metadata.Join
|
|
|
|
func request_HeadscaleService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
}
|
|
|
|
msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
}
|
|
|
|
msg, err := server.GetUser(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CreateUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CreateUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.CreateUser(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_RenameUser_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RenameUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["old_name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "old_name")
|
|
}
|
|
|
|
protoReq.OldName, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "old_name", err)
|
|
}
|
|
|
|
val, ok = pathParams["new_name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "new_name")
|
|
}
|
|
|
|
protoReq.NewName, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "new_name", err)
|
|
}
|
|
|
|
msg, err := client.RenameUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_RenameUser_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RenameUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["old_name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "old_name")
|
|
}
|
|
|
|
protoReq.OldName, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "old_name", err)
|
|
}
|
|
|
|
val, ok = pathParams["new_name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "new_name")
|
|
}
|
|
|
|
protoReq.NewName, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "new_name", err)
|
|
}
|
|
|
|
msg, err := server.RenameUser(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
}
|
|
|
|
msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteUserRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
}
|
|
|
|
msg, err := server.DeleteUser(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListUsersRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListUsersRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ListUsers(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_CreatePreAuthKey_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CreatePreAuthKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.CreatePreAuthKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_CreatePreAuthKey_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CreatePreAuthKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.CreatePreAuthKey(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_ExpirePreAuthKey_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExpirePreAuthKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ExpirePreAuthKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ExpirePreAuthKey_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExpirePreAuthKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ExpirePreAuthKey(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_HeadscaleService_ListPreAuthKeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_HeadscaleService_ListPreAuthKeys_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPreAuthKeysRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_ListPreAuthKeys_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListPreAuthKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ListPreAuthKeys_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListPreAuthKeysRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_ListPreAuthKeys_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListPreAuthKeys(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_DebugCreateNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DebugCreateNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.DebugCreateNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_DebugCreateNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DebugCreateNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.DebugCreateNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := server.GetNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_SetTags_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SetTagsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := client.SetTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_SetTags_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq SetTagsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := server.SetTags(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_HeadscaleService_RegisterNode_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_HeadscaleService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RegisterNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_RegisterNode_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RegisterNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_RegisterNode_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.RegisterNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_DeleteNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := client.DeleteNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_DeleteNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := server.DeleteNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_ExpireNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExpireNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := client.ExpireNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ExpireNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExpireNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := server.ExpireNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_RenameNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RenameNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
val, ok = pathParams["new_name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "new_name")
|
|
}
|
|
|
|
protoReq.NewName, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "new_name", err)
|
|
}
|
|
|
|
msg, err := client.RenameNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_RenameNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq RenameNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
val, ok = pathParams["new_name"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "new_name")
|
|
}
|
|
|
|
protoReq.NewName, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "new_name", err)
|
|
}
|
|
|
|
msg, err := server.RenameNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_HeadscaleService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_HeadscaleService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListNodesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_ListNodes_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListNodesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_ListNodes_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ListNodes(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_HeadscaleService_MoveNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
)
|
|
|
|
func request_HeadscaleService_MoveNode_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq MoveNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_MoveNode_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.MoveNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_MoveNode_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq MoveNodeRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_MoveNode_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.MoveNode(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
var (
|
|
filter_HeadscaleService_BackfillNodeIPs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
)
|
|
|
|
func request_HeadscaleService_BackfillNodeIPs_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq BackfillNodeIPsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_BackfillNodeIPs_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.BackfillNodeIPs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_BackfillNodeIPs_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq BackfillNodeIPsRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HeadscaleService_BackfillNodeIPs_0); err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.BackfillNodeIPs(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_GetRoutes_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.GetRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_GetRoutes_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.GetRoutes(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_EnableRoute_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq EnableRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["route_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "route_id")
|
|
}
|
|
|
|
protoReq.RouteId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "route_id", err)
|
|
}
|
|
|
|
msg, err := client.EnableRoute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_EnableRoute_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq EnableRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["route_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "route_id")
|
|
}
|
|
|
|
protoReq.RouteId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "route_id", err)
|
|
}
|
|
|
|
msg, err := server.EnableRoute(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_DisableRoute_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DisableRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["route_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "route_id")
|
|
}
|
|
|
|
protoReq.RouteId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "route_id", err)
|
|
}
|
|
|
|
msg, err := client.DisableRoute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_DisableRoute_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DisableRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["route_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "route_id")
|
|
}
|
|
|
|
protoReq.RouteId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "route_id", err)
|
|
}
|
|
|
|
msg, err := server.DisableRoute(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_GetNodeRoutes_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetNodeRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := client.GetNodeRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_GetNodeRoutes_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq GetNodeRoutesRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["node_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id")
|
|
}
|
|
|
|
protoReq.NodeId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err)
|
|
}
|
|
|
|
msg, err := server.GetNodeRoutes(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_DeleteRoute_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["route_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "route_id")
|
|
}
|
|
|
|
protoReq.RouteId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "route_id", err)
|
|
}
|
|
|
|
msg, err := client.DeleteRoute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_DeleteRoute_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteRouteRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["route_id"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "route_id")
|
|
}
|
|
|
|
protoReq.RouteId, err = runtime.Uint64(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "route_id", err)
|
|
}
|
|
|
|
msg, err := server.DeleteRoute(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_CreateApiKey_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CreateApiKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.CreateApiKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_CreateApiKey_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq CreateApiKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.CreateApiKey(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_ExpireApiKey_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExpireApiKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := client.ExpireApiKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ExpireApiKey_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ExpireApiKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
}
|
|
|
|
msg, err := server.ExpireApiKey(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_ListApiKeys_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListApiKeysRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := client.ListApiKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_ListApiKeys_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq ListApiKeysRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
msg, err := server.ListApiKeys(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func request_HeadscaleService_DeleteApiKey_0(ctx context.Context, marshaler runtime.Marshaler, client HeadscaleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteApiKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["prefix"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "prefix")
|
|
}
|
|
|
|
protoReq.Prefix, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "prefix", err)
|
|
}
|
|
|
|
msg, err := client.DeleteApiKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
func local_request_HeadscaleService_DeleteApiKey_0(ctx context.Context, marshaler runtime.Marshaler, server HeadscaleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
var protoReq DeleteApiKeyRequest
|
|
var metadata runtime.ServerMetadata
|
|
|
|
var (
|
|
val string
|
|
ok bool
|
|
err error
|
|
_ = err
|
|
)
|
|
|
|
val, ok = pathParams["prefix"]
|
|
if !ok {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "prefix")
|
|
}
|
|
|
|
protoReq.Prefix, err = runtime.String(val)
|
|
if err != nil {
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "prefix", err)
|
|
}
|
|
|
|
msg, err := server.DeleteApiKey(ctx, &protoReq)
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
// RegisterHeadscaleServiceHandlerServer registers the http handlers for service HeadscaleService to "mux".
|
|
// UnaryRPC :call HeadscaleServiceServer directly.
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHeadscaleServiceHandlerFromEndpoint instead.
|
|
func RegisterHeadscaleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HeadscaleServiceServer) error {
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetUser", runtime.WithHTTPPathPattern("/api/v1/user/{name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_GetUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/user"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_CreateUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_RenameUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/RenameUser", runtime.WithHTTPPathPattern("/api/v1/user/{old_name}/rename/{new_name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_RenameUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_RenameUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/user/{name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_DeleteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListUsers", runtime.WithHTTPPathPattern("/api/v1/user"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ListUsers_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_CreatePreAuthKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/CreatePreAuthKey", runtime.WithHTTPPathPattern("/api/v1/preauthkey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_CreatePreAuthKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_CreatePreAuthKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_ExpirePreAuthKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ExpirePreAuthKey", runtime.WithHTTPPathPattern("/api/v1/preauthkey/expire"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ExpirePreAuthKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ExpirePreAuthKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListPreAuthKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListPreAuthKeys", runtime.WithHTTPPathPattern("/api/v1/preauthkey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ListPreAuthKeys_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListPreAuthKeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_DebugCreateNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DebugCreateNode", runtime.WithHTTPPathPattern("/api/v1/debug/node"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_DebugCreateNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DebugCreateNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_GetNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_SetTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/SetTags", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/tags"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_SetTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_SetTags_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/RegisterNode", runtime.WithHTTPPathPattern("/api/v1/node/register"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_RegisterNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_DeleteNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_ExpireNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ExpireNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/expire"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ExpireNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ExpireNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_RenameNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/RenameNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/rename/{new_name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_RenameNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_RenameNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListNodes", runtime.WithHTTPPathPattern("/api/v1/node"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ListNodes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_MoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/MoveNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/user"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_MoveNode_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_MoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_BackfillNodeIPs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/BackfillNodeIPs", runtime.WithHTTPPathPattern("/api/v1/node/backfillips"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_BackfillNodeIPs_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_BackfillNodeIPs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetRoutes", runtime.WithHTTPPathPattern("/api/v1/routes"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_GetRoutes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_EnableRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/EnableRoute", runtime.WithHTTPPathPattern("/api/v1/routes/{route_id}/enable"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_EnableRoute_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_EnableRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_DisableRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DisableRoute", runtime.WithHTTPPathPattern("/api/v1/routes/{route_id}/disable"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_DisableRoute_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DisableRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetNodeRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetNodeRoutes", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/routes"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_GetNodeRoutes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetNodeRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteRoute", runtime.WithHTTPPathPattern("/api/v1/routes/{route_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_DeleteRoute_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_CreateApiKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/CreateApiKey", runtime.WithHTTPPathPattern("/api/v1/apikey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_CreateApiKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_CreateApiKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_ExpireApiKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ExpireApiKey", runtime.WithHTTPPathPattern("/api/v1/apikey/expire"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ExpireApiKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ExpireApiKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListApiKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListApiKeys", runtime.WithHTTPPathPattern("/api/v1/apikey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_ListApiKeys_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListApiKeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteApiKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
var stream runtime.ServerTransportStream
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteApiKey", runtime.WithHTTPPathPattern("/api/v1/apikey/{prefix}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := local_request_HeadscaleService_DeleteApiKey_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteApiKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
return nil
|
|
}
|
|
|
|
// RegisterHeadscaleServiceHandlerFromEndpoint is same as RegisterHeadscaleServiceHandler but
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
|
func RegisterHeadscaleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
|
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
defer func() {
|
|
if err != nil {
|
|
if cerr := conn.Close(); cerr != nil {
|
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
|
}
|
|
return
|
|
}
|
|
go func() {
|
|
<-ctx.Done()
|
|
if cerr := conn.Close(); cerr != nil {
|
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
|
}
|
|
}()
|
|
}()
|
|
|
|
return RegisterHeadscaleServiceHandler(ctx, mux, conn)
|
|
}
|
|
|
|
// RegisterHeadscaleServiceHandler registers the http handlers for service HeadscaleService to "mux".
|
|
// The handlers forward requests to the grpc endpoint over "conn".
|
|
func RegisterHeadscaleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
|
return RegisterHeadscaleServiceHandlerClient(ctx, mux, NewHeadscaleServiceClient(conn))
|
|
}
|
|
|
|
// RegisterHeadscaleServiceHandlerClient registers the http handlers for service HeadscaleService
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HeadscaleServiceClient".
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HeadscaleServiceClient"
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
|
// "HeadscaleServiceClient" to call the correct interceptors.
|
|
func RegisterHeadscaleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HeadscaleServiceClient) error {
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetUser", runtime.WithHTTPPathPattern("/api/v1/user/{name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/user"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_CreateUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_RenameUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/RenameUser", runtime.WithHTTPPathPattern("/api/v1/user/{old_name}/rename/{new_name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_RenameUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_RenameUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/user/{name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_DeleteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListUsers", runtime.WithHTTPPathPattern("/api/v1/user"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ListUsers_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_CreatePreAuthKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/CreatePreAuthKey", runtime.WithHTTPPathPattern("/api/v1/preauthkey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_CreatePreAuthKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_CreatePreAuthKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_ExpirePreAuthKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ExpirePreAuthKey", runtime.WithHTTPPathPattern("/api/v1/preauthkey/expire"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ExpirePreAuthKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ExpirePreAuthKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListPreAuthKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListPreAuthKeys", runtime.WithHTTPPathPattern("/api/v1/preauthkey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ListPreAuthKeys_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListPreAuthKeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_DebugCreateNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DebugCreateNode", runtime.WithHTTPPathPattern("/api/v1/debug/node"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_DebugCreateNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DebugCreateNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_GetNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_SetTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/SetTags", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/tags"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_SetTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_SetTags_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/RegisterNode", runtime.WithHTTPPathPattern("/api/v1/node/register"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_RegisterNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_DeleteNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_ExpireNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ExpireNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/expire"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ExpireNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ExpireNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_RenameNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/RenameNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/rename/{new_name}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_RenameNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_RenameNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListNodes", runtime.WithHTTPPathPattern("/api/v1/node"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ListNodes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_MoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/MoveNode", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/user"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_MoveNode_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_MoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_BackfillNodeIPs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/BackfillNodeIPs", runtime.WithHTTPPathPattern("/api/v1/node/backfillips"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_BackfillNodeIPs_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_BackfillNodeIPs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetRoutes", runtime.WithHTTPPathPattern("/api/v1/routes"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_GetRoutes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_EnableRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/EnableRoute", runtime.WithHTTPPathPattern("/api/v1/routes/{route_id}/enable"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_EnableRoute_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_EnableRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_DisableRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DisableRoute", runtime.WithHTTPPathPattern("/api/v1/routes/{route_id}/disable"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_DisableRoute_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DisableRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_GetNodeRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/GetNodeRoutes", runtime.WithHTTPPathPattern("/api/v1/node/{node_id}/routes"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_GetNodeRoutes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_GetNodeRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteRoute", runtime.WithHTTPPathPattern("/api/v1/routes/{route_id}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_DeleteRoute_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_CreateApiKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/CreateApiKey", runtime.WithHTTPPathPattern("/api/v1/apikey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_CreateApiKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_CreateApiKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("POST", pattern_HeadscaleService_ExpireApiKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ExpireApiKey", runtime.WithHTTPPathPattern("/api/v1/apikey/expire"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ExpireApiKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ExpireApiKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("GET", pattern_HeadscaleService_ListApiKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/ListApiKeys", runtime.WithHTTPPathPattern("/api/v1/apikey"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_ListApiKeys_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_ListApiKeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
mux.Handle("DELETE", pattern_HeadscaleService_DeleteApiKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
ctx, cancel := context.WithCancel(req.Context())
|
|
defer cancel()
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
|
var err error
|
|
var annotatedContext context.Context
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/headscale.v1.HeadscaleService/DeleteApiKey", runtime.WithHTTPPathPattern("/api/v1/apikey/{prefix}"))
|
|
if err != nil {
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
resp, md, err := request_HeadscaleService_DeleteApiKey_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
|
if err != nil {
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
|
return
|
|
}
|
|
|
|
forward_HeadscaleService_DeleteApiKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
return nil
|
|
}
|
|
|
|
var (
|
|
pattern_HeadscaleService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "user", "name"}, ""))
|
|
|
|
pattern_HeadscaleService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "user"}, ""))
|
|
|
|
pattern_HeadscaleService_RenameUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "user", "old_name", "rename", "new_name"}, ""))
|
|
|
|
pattern_HeadscaleService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "user", "name"}, ""))
|
|
|
|
pattern_HeadscaleService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "user"}, ""))
|
|
|
|
pattern_HeadscaleService_CreatePreAuthKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "preauthkey"}, ""))
|
|
|
|
pattern_HeadscaleService_ExpirePreAuthKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "preauthkey", "expire"}, ""))
|
|
|
|
pattern_HeadscaleService_ListPreAuthKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "preauthkey"}, ""))
|
|
|
|
pattern_HeadscaleService_DebugCreateNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "debug", "node"}, ""))
|
|
|
|
pattern_HeadscaleService_GetNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "node", "node_id"}, ""))
|
|
|
|
pattern_HeadscaleService_SetTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "node", "node_id", "tags"}, ""))
|
|
|
|
pattern_HeadscaleService_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "node", "register"}, ""))
|
|
|
|
pattern_HeadscaleService_DeleteNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "node", "node_id"}, ""))
|
|
|
|
pattern_HeadscaleService_ExpireNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "node", "node_id", "expire"}, ""))
|
|
|
|
pattern_HeadscaleService_RenameNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "node", "node_id", "rename", "new_name"}, ""))
|
|
|
|
pattern_HeadscaleService_ListNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "node"}, ""))
|
|
|
|
pattern_HeadscaleService_MoveNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "node", "node_id", "user"}, ""))
|
|
|
|
pattern_HeadscaleService_BackfillNodeIPs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "node", "backfillips"}, ""))
|
|
|
|
pattern_HeadscaleService_GetRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "routes"}, ""))
|
|
|
|
pattern_HeadscaleService_EnableRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "routes", "route_id", "enable"}, ""))
|
|
|
|
pattern_HeadscaleService_DisableRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "routes", "route_id", "disable"}, ""))
|
|
|
|
pattern_HeadscaleService_GetNodeRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "node", "node_id", "routes"}, ""))
|
|
|
|
pattern_HeadscaleService_DeleteRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "routes", "route_id"}, ""))
|
|
|
|
pattern_HeadscaleService_CreateApiKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "apikey"}, ""))
|
|
|
|
pattern_HeadscaleService_ExpireApiKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "apikey", "expire"}, ""))
|
|
|
|
pattern_HeadscaleService_ListApiKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "apikey"}, ""))
|
|
|
|
pattern_HeadscaleService_DeleteApiKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "apikey", "prefix"}, ""))
|
|
)
|
|
|
|
var (
|
|
forward_HeadscaleService_GetUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_CreateUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_RenameUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_DeleteUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ListUsers_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_CreatePreAuthKey_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ExpirePreAuthKey_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ListPreAuthKeys_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_DebugCreateNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_GetNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_SetTags_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_RegisterNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_DeleteNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ExpireNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_RenameNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ListNodes_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_MoveNode_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_BackfillNodeIPs_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_GetRoutes_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_EnableRoute_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_DisableRoute_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_GetNodeRoutes_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_DeleteRoute_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_CreateApiKey_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ExpireApiKey_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_ListApiKeys_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_HeadscaleService_DeleteApiKey_0 = runtime.ForwardResponseMessage
|
|
)
|