v1

package
v1.12.7 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Unlicense Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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.

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"`
	Command     string `protobuf:"bytes,4,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) 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"`
	Command     string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
	ContentType string `protobuf:"bytes,5,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	Data        []byte `protobuf:"bytes,6,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) 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

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.

Jump to

Keyboard shortcuts

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