Documentation ¶
Overview ¶
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error
- func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error
- func RegisterAuthServer(s *grpc.Server, srv AuthServer)
- type AuthAPIKey
- func (*AuthAPIKey) Descriptor() ([]byte, []int)deprecated
- func (x *AuthAPIKey) GetDescription() string
- func (x *AuthAPIKey) GetId() int64
- func (x *AuthAPIKey) GetName() string
- func (*AuthAPIKey) ProtoMessage()
- func (x *AuthAPIKey) ProtoReflect() protoreflect.Message
- func (x *AuthAPIKey) Reset()
- func (x *AuthAPIKey) String() string
- type AuthClient
- type AuthServer
- type CreateAuthKeyRequest
- func (*CreateAuthKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAuthKeyRequest) GetDescription() string
- func (x *CreateAuthKeyRequest) GetName() string
- func (*CreateAuthKeyRequest) ProtoMessage()
- func (x *CreateAuthKeyRequest) ProtoReflect() protoreflect.Message
- func (x *CreateAuthKeyRequest) Reset()
- func (x *CreateAuthKeyRequest) String() string
- type CreateAuthKeyResponse
- func (*CreateAuthKeyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAuthKeyResponse) GetKey() string
- func (*CreateAuthKeyResponse) ProtoMessage()
- func (x *CreateAuthKeyResponse) ProtoReflect() protoreflect.Message
- func (x *CreateAuthKeyResponse) Reset()
- func (x *CreateAuthKeyResponse) String() string
- type DeleteAuthKeyRequest
- func (*DeleteAuthKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAuthKeyRequest) GetId() int64
- func (*DeleteAuthKeyRequest) ProtoMessage()
- func (x *DeleteAuthKeyRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteAuthKeyRequest) Reset()
- func (x *DeleteAuthKeyRequest) String() string
- type DeleteAuthKeyResponse
- type GetAuthKeysRequest
- type GetAuthKeysResponse
- func (*GetAuthKeysResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAuthKeysResponse) GetKeys() []*AuthAPIKey
- func (*GetAuthKeysResponse) ProtoMessage()
- func (x *GetAuthKeysResponse) ProtoReflect() protoreflect.Message
- func (x *GetAuthKeysResponse) Reset()
- func (x *GetAuthKeysResponse) String() string
- type UnimplementedAuthServer
- func (*UnimplementedAuthServer) CreateAuthKey(context.Context, *CreateAuthKeyRequest) (*CreateAuthKeyResponse, error)
- func (*UnimplementedAuthServer) DeleteAuthKey(context.Context, *DeleteAuthKeyRequest) (*DeleteAuthKeyResponse, error)
- func (*UnimplementedAuthServer) GetAuthKeys(context.Context, *GetAuthKeysRequest) (*GetAuthKeysResponse, error)
- func (*UnimplementedAuthServer) UpdateAuthKey(context.Context, *UpdateAuthKeyRequest) (*UpdateAuthKeyResponse, error)
- type UpdateAuthKeyRequest
- func (*UpdateAuthKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateAuthKeyRequest) GetDescription() string
- func (x *UpdateAuthKeyRequest) GetId() int64
- func (x *UpdateAuthKeyRequest) GetName() string
- func (*UpdateAuthKeyRequest) ProtoMessage()
- func (x *UpdateAuthKeyRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateAuthKeyRequest) Reset()
- func (x *UpdateAuthKeyRequest) String() string
- type UpdateAuthKeyResponse
Constants ¶
This section is empty.
Variables ¶
var File_proto_imp_api_auth_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthHandler ¶
RegisterAuthHandler registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthHandlerClient ¶
RegisterAuthHandlerClient registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthClient" to call the correct interceptors.
func RegisterAuthHandlerFromEndpoint ¶
func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthHandlerServer ¶
RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". UnaryRPC :call AuthServer 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 RegisterAuthHandlerFromEndpoint instead.
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
Types ¶
type AuthAPIKey ¶
type AuthAPIKey struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // the ID of the API key Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // the name of the API key Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // the description of the API key // contains filtered or unexported fields }
func (*AuthAPIKey) Descriptor
deprecated
func (*AuthAPIKey) Descriptor() ([]byte, []int)
Deprecated: Use AuthAPIKey.ProtoReflect.Descriptor instead.
func (*AuthAPIKey) GetDescription ¶
func (x *AuthAPIKey) GetDescription() string
func (*AuthAPIKey) GetId ¶
func (x *AuthAPIKey) GetId() int64
func (*AuthAPIKey) GetName ¶
func (x *AuthAPIKey) GetName() string
func (*AuthAPIKey) ProtoMessage ¶
func (*AuthAPIKey) ProtoMessage()
func (*AuthAPIKey) ProtoReflect ¶
func (x *AuthAPIKey) ProtoReflect() protoreflect.Message
func (*AuthAPIKey) Reset ¶
func (x *AuthAPIKey) Reset()
func (*AuthAPIKey) String ¶
func (x *AuthAPIKey) String() string
type AuthClient ¶
type AuthClient interface { //* // GetAuthKeys gets a list of auth api keys for the daemon. GetAuthKeys(ctx context.Context, in *GetAuthKeysRequest, opts ...grpc.CallOption) (*GetAuthKeysResponse, error) //* // CreateAuthKey creates a new api key for authentication into the daemon. CreateAuthKey(ctx context.Context, in *CreateAuthKeyRequest, opts ...grpc.CallOption) (*CreateAuthKeyResponse, error) //* // UpdateAuthKey updates api key details. UpdateAuthKey(ctx context.Context, in *UpdateAuthKeyRequest, opts ...grpc.CallOption) (*UpdateAuthKeyResponse, error) //* // DeleteAuthKey will delete a specific api key. DeleteAuthKey(ctx context.Context, in *DeleteAuthKeyRequest, opts ...grpc.CallOption) (*DeleteAuthKeyResponse, error) }
AuthClient is the client API for Auth service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { //* // GetAuthKeys gets a list of auth api keys for the daemon. GetAuthKeys(context.Context, *GetAuthKeysRequest) (*GetAuthKeysResponse, error) //* // CreateAuthKey creates a new api key for authentication into the daemon. CreateAuthKey(context.Context, *CreateAuthKeyRequest) (*CreateAuthKeyResponse, error) //* // UpdateAuthKey updates api key details. UpdateAuthKey(context.Context, *UpdateAuthKeyRequest) (*UpdateAuthKeyResponse, error) //* // DeleteAuthKey will delete a specific api key. DeleteAuthKey(context.Context, *DeleteAuthKeyRequest) (*DeleteAuthKeyResponse, error) }
AuthServer is the server API for Auth service.
type CreateAuthKeyRequest ¶
type CreateAuthKeyRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the name of the API key Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // the description of the API key // contains filtered or unexported fields }
* Represents a request to create a new auth API key.
func (*CreateAuthKeyRequest) Descriptor
deprecated
func (*CreateAuthKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAuthKeyRequest.ProtoReflect.Descriptor instead.
func (*CreateAuthKeyRequest) GetDescription ¶
func (x *CreateAuthKeyRequest) GetDescription() string
func (*CreateAuthKeyRequest) GetName ¶
func (x *CreateAuthKeyRequest) GetName() string
func (*CreateAuthKeyRequest) ProtoMessage ¶
func (*CreateAuthKeyRequest) ProtoMessage()
func (*CreateAuthKeyRequest) ProtoReflect ¶
func (x *CreateAuthKeyRequest) ProtoReflect() protoreflect.Message
func (*CreateAuthKeyRequest) Reset ¶
func (x *CreateAuthKeyRequest) Reset()
func (*CreateAuthKeyRequest) String ¶
func (x *CreateAuthKeyRequest) String() string
type CreateAuthKeyResponse ¶
type CreateAuthKeyResponse struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // the API key itself in UUID string formation // contains filtered or unexported fields }
* Represents a response containing the new auth API key.
func (*CreateAuthKeyResponse) Descriptor
deprecated
func (*CreateAuthKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateAuthKeyResponse.ProtoReflect.Descriptor instead.
func (*CreateAuthKeyResponse) GetKey ¶
func (x *CreateAuthKeyResponse) GetKey() string
func (*CreateAuthKeyResponse) ProtoMessage ¶
func (*CreateAuthKeyResponse) ProtoMessage()
func (*CreateAuthKeyResponse) ProtoReflect ¶
func (x *CreateAuthKeyResponse) ProtoReflect() protoreflect.Message
func (*CreateAuthKeyResponse) Reset ¶
func (x *CreateAuthKeyResponse) Reset()
func (*CreateAuthKeyResponse) String ¶
func (x *CreateAuthKeyResponse) String() string
type DeleteAuthKeyRequest ¶
type DeleteAuthKeyRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // the id of the API key to delete // contains filtered or unexported fields }
* Represents a request to delete an auth API key.
func (*DeleteAuthKeyRequest) Descriptor
deprecated
func (*DeleteAuthKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAuthKeyRequest.ProtoReflect.Descriptor instead.
func (*DeleteAuthKeyRequest) GetId ¶
func (x *DeleteAuthKeyRequest) GetId() int64
func (*DeleteAuthKeyRequest) ProtoMessage ¶
func (*DeleteAuthKeyRequest) ProtoMessage()
func (*DeleteAuthKeyRequest) ProtoReflect ¶
func (x *DeleteAuthKeyRequest) ProtoReflect() protoreflect.Message
func (*DeleteAuthKeyRequest) Reset ¶
func (x *DeleteAuthKeyRequest) Reset()
func (*DeleteAuthKeyRequest) String ¶
func (x *DeleteAuthKeyRequest) String() string
type DeleteAuthKeyResponse ¶
type DeleteAuthKeyResponse struct {
// contains filtered or unexported fields
}
* Represents a response containing the deletion results.
func (*DeleteAuthKeyResponse) Descriptor
deprecated
func (*DeleteAuthKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAuthKeyResponse.ProtoReflect.Descriptor instead.
func (*DeleteAuthKeyResponse) ProtoMessage ¶
func (*DeleteAuthKeyResponse) ProtoMessage()
func (*DeleteAuthKeyResponse) ProtoReflect ¶
func (x *DeleteAuthKeyResponse) ProtoReflect() protoreflect.Message
func (*DeleteAuthKeyResponse) Reset ¶
func (x *DeleteAuthKeyResponse) Reset()
func (*DeleteAuthKeyResponse) String ¶
func (x *DeleteAuthKeyResponse) String() string
type GetAuthKeysRequest ¶
type GetAuthKeysRequest struct {
// contains filtered or unexported fields
}
* Represents a request to get a list of the auth API keys.
func (*GetAuthKeysRequest) Descriptor
deprecated
func (*GetAuthKeysRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAuthKeysRequest.ProtoReflect.Descriptor instead.
func (*GetAuthKeysRequest) ProtoMessage ¶
func (*GetAuthKeysRequest) ProtoMessage()
func (*GetAuthKeysRequest) ProtoReflect ¶
func (x *GetAuthKeysRequest) ProtoReflect() protoreflect.Message
func (*GetAuthKeysRequest) Reset ¶
func (x *GetAuthKeysRequest) Reset()
func (*GetAuthKeysRequest) String ¶
func (x *GetAuthKeysRequest) String() string
type GetAuthKeysResponse ¶
type GetAuthKeysResponse struct { Keys []*AuthAPIKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` // the list of API keys // contains filtered or unexported fields }
* Represents a response the list of auth API keys.
func (*GetAuthKeysResponse) Descriptor
deprecated
func (*GetAuthKeysResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAuthKeysResponse.ProtoReflect.Descriptor instead.
func (*GetAuthKeysResponse) GetKeys ¶
func (x *GetAuthKeysResponse) GetKeys() []*AuthAPIKey
func (*GetAuthKeysResponse) ProtoMessage ¶
func (*GetAuthKeysResponse) ProtoMessage()
func (*GetAuthKeysResponse) ProtoReflect ¶
func (x *GetAuthKeysResponse) ProtoReflect() protoreflect.Message
func (*GetAuthKeysResponse) Reset ¶
func (x *GetAuthKeysResponse) Reset()
func (*GetAuthKeysResponse) String ¶
func (x *GetAuthKeysResponse) String() string
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuthServer) CreateAuthKey ¶
func (*UnimplementedAuthServer) CreateAuthKey(context.Context, *CreateAuthKeyRequest) (*CreateAuthKeyResponse, error)
func (*UnimplementedAuthServer) DeleteAuthKey ¶
func (*UnimplementedAuthServer) DeleteAuthKey(context.Context, *DeleteAuthKeyRequest) (*DeleteAuthKeyResponse, error)
func (*UnimplementedAuthServer) GetAuthKeys ¶
func (*UnimplementedAuthServer) GetAuthKeys(context.Context, *GetAuthKeysRequest) (*GetAuthKeysResponse, error)
func (*UnimplementedAuthServer) UpdateAuthKey ¶
func (*UnimplementedAuthServer) UpdateAuthKey(context.Context, *UpdateAuthKeyRequest) (*UpdateAuthKeyResponse, error)
type UpdateAuthKeyRequest ¶
type UpdateAuthKeyRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // the id of the API key to update Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // the name of the API key Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // the description of the API key // contains filtered or unexported fields }
* Represents a request to update an auth API key.
func (*UpdateAuthKeyRequest) Descriptor
deprecated
func (*UpdateAuthKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateAuthKeyRequest.ProtoReflect.Descriptor instead.
func (*UpdateAuthKeyRequest) GetDescription ¶
func (x *UpdateAuthKeyRequest) GetDescription() string
func (*UpdateAuthKeyRequest) GetId ¶
func (x *UpdateAuthKeyRequest) GetId() int64
func (*UpdateAuthKeyRequest) GetName ¶
func (x *UpdateAuthKeyRequest) GetName() string
func (*UpdateAuthKeyRequest) ProtoMessage ¶
func (*UpdateAuthKeyRequest) ProtoMessage()
func (*UpdateAuthKeyRequest) ProtoReflect ¶
func (x *UpdateAuthKeyRequest) ProtoReflect() protoreflect.Message
func (*UpdateAuthKeyRequest) Reset ¶
func (x *UpdateAuthKeyRequest) Reset()
func (*UpdateAuthKeyRequest) String ¶
func (x *UpdateAuthKeyRequest) String() string
type UpdateAuthKeyResponse ¶
type UpdateAuthKeyResponse struct {
// contains filtered or unexported fields
}
* Represents a response containing the update results.
func (*UpdateAuthKeyResponse) Descriptor
deprecated
func (*UpdateAuthKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateAuthKeyResponse.ProtoReflect.Descriptor instead.
func (*UpdateAuthKeyResponse) ProtoMessage ¶
func (*UpdateAuthKeyResponse) ProtoMessage()
func (*UpdateAuthKeyResponse) ProtoReflect ¶
func (x *UpdateAuthKeyResponse) ProtoReflect() protoreflect.Message
func (*UpdateAuthKeyResponse) Reset ¶
func (x *UpdateAuthKeyResponse) Reset()
func (*UpdateAuthKeyResponse) String ¶
func (x *UpdateAuthKeyResponse) String() string