secretssvc

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package secretssvc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_secretssvc_svc_proto protoreflect.FileDescriptor
View Source
var Secrets_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "autokitteh.secretssvc.Secrets",
	HandlerType: (*SecretsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Set",
			Handler:    _Secrets_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Secrets_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Secrets_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "secretssvc/svc.proto",
}

Secrets_ServiceDesc is the grpc.ServiceDesc for Secrets service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSecretsHandler

func RegisterSecretsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSecretsHandler registers the http handlers for service Secrets to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSecretsHandlerClient

func RegisterSecretsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecretsClient) error

RegisterSecretsHandlerClient registers the http handlers for service Secrets to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecretsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecretsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SecretsClient" to call the correct interceptors.

func RegisterSecretsHandlerFromEndpoint

func RegisterSecretsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSecretsHandlerFromEndpoint is same as RegisterSecretsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSecretsHandlerServer

func RegisterSecretsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecretsServer) error

RegisterSecretsHandlerServer registers the http handlers for service Secrets to "mux". UnaryRPC :call SecretsServer 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 RegisterSecretsHandlerFromEndpoint instead.

func RegisterSecretsServer

func RegisterSecretsServer(s grpc.ServiceRegistrar, srv SecretsServer)

Types

type GetRequest

type GetRequest struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetName

func (x *GetRequest) GetName() string

func (*GetRequest) GetProjectId

func (x *GetRequest) GetProjectId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

func (*GetRequest) Validate

func (m *GetRequest) Validate() error

Validate checks the field values on GetRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetRequestValidationError

type GetRequestValidationError struct {
	// contains filtered or unexported fields
}

GetRequestValidationError is the validation error returned by GetRequest.Validate if the designated constraints aren't met.

func (GetRequestValidationError) Cause

func (e GetRequestValidationError) Cause() error

Cause function returns cause value.

func (GetRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRequestValidationError) ErrorName

func (e GetRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetRequestValidationError) Field

Field function returns field value.

func (GetRequestValidationError) Key

Key function returns key value.

func (GetRequestValidationError) Reason

func (e GetRequestValidationError) Reason() string

Reason function returns reason value.

type GetResponse

type GetResponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetValue

func (x *GetResponse) GetValue() string

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

func (x *GetResponse) ProtoReflect() protoreflect.Message

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

func (*GetResponse) Validate

func (m *GetResponse) Validate() error

Validate checks the field values on GetResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetResponseValidationError

type GetResponseValidationError struct {
	// contains filtered or unexported fields
}

GetResponseValidationError is the validation error returned by GetResponse.Validate if the designated constraints aren't met.

func (GetResponseValidationError) Cause

Cause function returns cause value.

func (GetResponseValidationError) Error

Error satisfies the builtin error interface

func (GetResponseValidationError) ErrorName

func (e GetResponseValidationError) ErrorName() string

ErrorName returns error name.

func (GetResponseValidationError) Field

Field function returns field value.

func (GetResponseValidationError) Key

Key function returns key value.

func (GetResponseValidationError) Reason

Reason function returns reason value.

type ListRequest

type ListRequest struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetProjectId

func (x *ListRequest) GetProjectId() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

func (*ListRequest) Validate

func (m *ListRequest) Validate() error

Validate checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListRequestValidationError

type ListRequestValidationError struct {
	// contains filtered or unexported fields
}

ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.

func (ListRequestValidationError) Cause

Cause function returns cause value.

func (ListRequestValidationError) Error

Error satisfies the builtin error interface

func (ListRequestValidationError) ErrorName

func (e ListRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ListRequestValidationError) Field

Field function returns field value.

func (ListRequestValidationError) Key

Key function returns key value.

func (ListRequestValidationError) Reason

Reason function returns reason value.

type ListResponse

type ListResponse struct {
	Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetNames

func (x *ListResponse) GetNames() []string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

func (*ListResponse) Validate

func (m *ListResponse) Validate() error

Validate checks the field values on ListResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListResponseValidationError

type ListResponseValidationError struct {
	// contains filtered or unexported fields
}

ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.

func (ListResponseValidationError) Cause

Cause function returns cause value.

func (ListResponseValidationError) Error

Error satisfies the builtin error interface

func (ListResponseValidationError) ErrorName

func (e ListResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ListResponseValidationError) Field

Field function returns field value.

func (ListResponseValidationError) Key

Key function returns key value.

func (ListResponseValidationError) Reason

Reason function returns reason value.

type SecretsClient

type SecretsClient interface {
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
}

SecretsClient is the client API for Secrets service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSecretsClient

func NewSecretsClient(cc grpc.ClientConnInterface) SecretsClient

type SecretsServer

type SecretsServer interface {
	Set(context.Context, *SetRequest) (*SetResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	// contains filtered or unexported methods
}

SecretsServer is the server API for Secrets service. All implementations must embed UnimplementedSecretsServer for forward compatibility

type SetRequest

type SetRequest struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Value     string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // omit to delete.
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

func (*SetRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetName

func (x *SetRequest) GetName() string

func (*SetRequest) GetProjectId

func (x *SetRequest) GetProjectId() string

func (*SetRequest) GetValue

func (x *SetRequest) GetValue() string

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

func (x *SetRequest) ProtoReflect() protoreflect.Message

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

func (*SetRequest) Validate

func (m *SetRequest) Validate() error

Validate checks the field values on SetRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type SetRequestValidationError

type SetRequestValidationError struct {
	// contains filtered or unexported fields
}

SetRequestValidationError is the validation error returned by SetRequest.Validate if the designated constraints aren't met.

func (SetRequestValidationError) Cause

func (e SetRequestValidationError) Cause() error

Cause function returns cause value.

func (SetRequestValidationError) Error

Error satisfies the builtin error interface

func (SetRequestValidationError) ErrorName

func (e SetRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SetRequestValidationError) Field

Field function returns field value.

func (SetRequestValidationError) Key

Key function returns key value.

func (SetRequestValidationError) Reason

func (e SetRequestValidationError) Reason() string

Reason function returns reason value.

type SetResponse

type SetResponse struct {
	// contains filtered or unexported fields
}

func (*SetResponse) Descriptor deprecated

func (*SetResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) ProtoReflect

func (x *SetResponse) ProtoReflect() protoreflect.Message

func (*SetResponse) Reset

func (x *SetResponse) Reset()

func (*SetResponse) String

func (x *SetResponse) String() string

func (*SetResponse) Validate

func (m *SetResponse) Validate() error

Validate checks the field values on SetResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type SetResponseValidationError

type SetResponseValidationError struct {
	// contains filtered or unexported fields
}

SetResponseValidationError is the validation error returned by SetResponse.Validate if the designated constraints aren't met.

func (SetResponseValidationError) Cause

Cause function returns cause value.

func (SetResponseValidationError) Error

Error satisfies the builtin error interface

func (SetResponseValidationError) ErrorName

func (e SetResponseValidationError) ErrorName() string

ErrorName returns error name.

func (SetResponseValidationError) Field

Field function returns field value.

func (SetResponseValidationError) Key

Key function returns key value.

func (SetResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedSecretsServer

type UnimplementedSecretsServer struct {
}

UnimplementedSecretsServer must be embedded to have forward compatible implementations.

func (UnimplementedSecretsServer) Get

func (UnimplementedSecretsServer) List

func (UnimplementedSecretsServer) Set

type UnsafeSecretsServer

type UnsafeSecretsServer interface {
	// contains filtered or unexported methods
}

UnsafeSecretsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SecretsServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL