Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterConfiguratorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConfiguratorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfiguratorServiceClient) error
- func RegisterConfiguratorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConfiguratorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfiguratorServiceServer) error
- func RegisterConfiguratorServiceServer(s grpc.ServiceRegistrar, srv ConfiguratorServiceServer)
- type ConfiguratorServiceClient
- type ConfiguratorServiceServer
- type GetConfigRequest
- func (*GetConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetConfigRequest) GetApplication() string
- func (x *GetConfigRequest) GetCluster() string
- func (x *GetConfigRequest) GetCommand() string
- func (x *GetConfigRequest) GetEnvironment() string
- func (x *GetConfigRequest) GetVersion() string
- func (*GetConfigRequest) ProtoMessage()
- func (x *GetConfigRequest) ProtoReflect() protoreflect.Message
- func (x *GetConfigRequest) Reset()
- func (x *GetConfigRequest) String() string
- type GetConfigResponse
- func (*GetConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetConfigResponse) GetApplication() string
- func (x *GetConfigResponse) GetCluster() string
- func (x *GetConfigResponse) GetCommand() string
- func (x *GetConfigResponse) GetContentType() string
- func (x *GetConfigResponse) GetData() []byte
- func (x *GetConfigResponse) GetEnvironment() string
- func (x *GetConfigResponse) GetVersion() string
- func (*GetConfigResponse) ProtoMessage()
- func (x *GetConfigResponse) ProtoReflect() protoreflect.Message
- func (x *GetConfigResponse) Reset()
- func (x *GetConfigResponse) String() string
- type UnimplementedConfiguratorServiceServer
- type UnsafeConfiguratorServiceServer
Constants ¶
This section is empty.
Variables ¶
var ConfiguratorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "konfig.v1.ConfiguratorService", HandlerType: (*ConfiguratorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetConfig", Handler: _ConfiguratorService_GetConfig_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "konfig/v1/service.proto", }
ConfiguratorService_ServiceDesc is the grpc.ServiceDesc for ConfiguratorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_konfig_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConfiguratorServiceHandler ¶
func RegisterConfiguratorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterConfiguratorServiceHandler registers the http handlers for service ConfiguratorService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterConfiguratorServiceHandlerClient ¶
func RegisterConfiguratorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfiguratorServiceClient) error
RegisterConfiguratorServiceHandlerClient registers the http handlers for service ConfiguratorService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfiguratorServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfiguratorServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConfiguratorServiceClient" to call the correct interceptors.
func RegisterConfiguratorServiceHandlerFromEndpoint ¶
func RegisterConfiguratorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterConfiguratorServiceHandlerFromEndpoint is same as RegisterConfiguratorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConfiguratorServiceHandlerServer ¶
func RegisterConfiguratorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfiguratorServiceServer) error
RegisterConfiguratorServiceHandlerServer registers the http handlers for service ConfiguratorService to "mux". UnaryRPC :call ConfiguratorServiceServer 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 RegisterConfiguratorServiceHandlerFromEndpoint instead.
func RegisterConfiguratorServiceServer ¶
func RegisterConfiguratorServiceServer(s grpc.ServiceRegistrar, srv ConfiguratorServiceServer)
Types ¶
type ConfiguratorServiceClient ¶
type ConfiguratorServiceClient interface { // GetConfig for a specific application, version, environment and command. GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) }
ConfiguratorServiceClient is the client API for ConfiguratorService 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 NewConfiguratorServiceClient ¶
func NewConfiguratorServiceClient(cc grpc.ClientConnInterface) ConfiguratorServiceClient
type ConfiguratorServiceServer ¶
type ConfiguratorServiceServer interface { // GetConfig for a specific application, version, environment and command. GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) // contains filtered or unexported methods }
ConfiguratorServiceServer is the server API for ConfiguratorService service. All implementations must embed UnimplementedConfiguratorServiceServer for forward compatibility
type GetConfigRequest ¶
type GetConfigRequest struct { Application string `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Environment string `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"` Cluster string `protobuf:"bytes,4,opt,name=cluster,proto3" json:"cluster,omitempty"` Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty"` // contains filtered or unexported fields }
GetConfigRequest for a specific application, version, environment and command.
func (*GetConfigRequest) Descriptor
deprecated
func (*GetConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead.
func (*GetConfigRequest) GetApplication ¶
func (x *GetConfigRequest) GetApplication() string
func (*GetConfigRequest) GetCluster ¶ added in v1.13.0
func (x *GetConfigRequest) GetCluster() string
func (*GetConfigRequest) GetCommand ¶
func (x *GetConfigRequest) GetCommand() string
func (*GetConfigRequest) GetEnvironment ¶
func (x *GetConfigRequest) GetEnvironment() string
func (*GetConfigRequest) GetVersion ¶
func (x *GetConfigRequest) GetVersion() string
func (*GetConfigRequest) ProtoMessage ¶
func (*GetConfigRequest) ProtoMessage()
func (*GetConfigRequest) ProtoReflect ¶
func (x *GetConfigRequest) ProtoReflect() protoreflect.Message
func (*GetConfigRequest) Reset ¶
func (x *GetConfigRequest) Reset()
func (*GetConfigRequest) String ¶
func (x *GetConfigRequest) String() string
type GetConfigResponse ¶
type GetConfigResponse struct { Application string `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Environment string `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"` Cluster string `protobuf:"bytes,4,opt,name=cluster,proto3" json:"cluster,omitempty"` Command string `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty"` ContentType string `protobuf:"bytes,6,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
GetConfigResponse for a specific application, version, environment and command with the data and content type.
func (*GetConfigResponse) Descriptor
deprecated
func (*GetConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.
func (*GetConfigResponse) GetApplication ¶
func (x *GetConfigResponse) GetApplication() string
func (*GetConfigResponse) GetCluster ¶ added in v1.13.0
func (x *GetConfigResponse) GetCluster() string
func (*GetConfigResponse) GetCommand ¶
func (x *GetConfigResponse) GetCommand() string
func (*GetConfigResponse) GetContentType ¶
func (x *GetConfigResponse) GetContentType() string
func (*GetConfigResponse) GetData ¶
func (x *GetConfigResponse) GetData() []byte
func (*GetConfigResponse) GetEnvironment ¶
func (x *GetConfigResponse) GetEnvironment() string
func (*GetConfigResponse) GetVersion ¶
func (x *GetConfigResponse) GetVersion() string
func (*GetConfigResponse) ProtoMessage ¶
func (*GetConfigResponse) ProtoMessage()
func (*GetConfigResponse) ProtoReflect ¶
func (x *GetConfigResponse) ProtoReflect() protoreflect.Message
func (*GetConfigResponse) Reset ¶
func (x *GetConfigResponse) Reset()
func (*GetConfigResponse) String ¶
func (x *GetConfigResponse) String() string
type UnimplementedConfiguratorServiceServer ¶
type UnimplementedConfiguratorServiceServer struct { }
UnimplementedConfiguratorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedConfiguratorServiceServer) GetConfig ¶
func (UnimplementedConfiguratorServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
type UnsafeConfiguratorServiceServer ¶
type UnsafeConfiguratorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConfiguratorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfiguratorServiceServer will result in compilation errors.