v1

package
v1.81.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Service_GetConfig_FullMethodName = "/konfig.v1.Service/GetConfig"
)

Variables

View Source
var File_konfig_v1_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "konfig.v1.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConfig",
			Handler:    _Service_GetConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "konfig/v1/service.proto",
}

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

Functions

func RegisterServiceHandler added in v1.14.0

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

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

func RegisterServiceHandlerClient added in v1.14.0

func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error

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

func RegisterServiceHandlerFromEndpoint added in v1.14.0

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

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

func RegisterServiceHandlerServer added in v1.14.0

func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error

RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead.

func RegisterServiceServer added in v1.14.0

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Config added in v1.14.0

type Config 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"`
	Continent   string `protobuf:"bytes,4,opt,name=continent,proto3" json:"continent,omitempty"`
	Country     string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"`
	Command     string `protobuf:"bytes,6,opt,name=command,proto3" json:"command,omitempty"`
	Kind        string `protobuf:"bytes,7,opt,name=kind,proto3" json:"kind,omitempty"`
	Data        []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Config for a specific application.

func (*Config) Descriptor deprecated added in v1.14.0

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetApplication added in v1.14.0

func (x *Config) GetApplication() string

func (*Config) GetCommand added in v1.14.0

func (x *Config) GetCommand() string

func (*Config) GetContinent added in v1.24.0

func (x *Config) GetContinent() string

func (*Config) GetCountry added in v1.25.0

func (x *Config) GetCountry() string

func (*Config) GetData added in v1.14.0

func (x *Config) GetData() []byte

func (*Config) GetEnvironment added in v1.14.0

func (x *Config) GetEnvironment() string

func (*Config) GetKind added in v1.28.0

func (x *Config) GetKind() string

func (*Config) GetVersion added in v1.14.0

func (x *Config) GetVersion() string

func (*Config) ProtoMessage added in v1.14.0

func (*Config) ProtoMessage()

func (*Config) ProtoReflect added in v1.14.0

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

func (*Config) Reset added in v1.14.0

func (x *Config) Reset()

func (*Config) String added in v1.14.0

func (x *Config) String() string

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"`
	Continent   string `protobuf:"bytes,4,opt,name=continent,proto3" json:"continent,omitempty"`
	Country     string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"`
	Command     string `protobuf:"bytes,6,opt,name=command,proto3" json:"command,omitempty"`
	Kind        string `protobuf:"bytes,7,opt,name=kind,proto3" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

GetConfigRequest for a specific application.

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) GetContinent added in v1.24.0

func (x *GetConfigRequest) GetContinent() string

func (*GetConfigRequest) GetCountry added in v1.25.0

func (x *GetConfigRequest) GetCountry() string

func (*GetConfigRequest) GetEnvironment

func (x *GetConfigRequest) GetEnvironment() string

func (*GetConfigRequest) GetKind added in v1.28.0

func (x *GetConfigRequest) GetKind() 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 {
	Meta   map[string]string `` /* 149-byte string literal not displayed */
	Config *Config           `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

GetConfigResponse for a specific application.

func (*GetConfigResponse) Descriptor deprecated

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

Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.

func (*GetConfigResponse) GetConfig added in v1.14.0

func (x *GetConfigResponse) GetConfig() *Config

func (*GetConfigResponse) GetMeta added in v1.50.0

func (x *GetConfigResponse) GetMeta() map[string]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 ServiceClient added in v1.14.0

type ServiceClient interface {
	// GetConfig for a specific application.
	GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient added in v1.14.0

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer added in v1.14.0

type ServiceServer interface {
	// GetConfig for a specific application.
	GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer added in v1.14.0

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) GetConfig added in v1.14.0

type UnsafeServiceServer added in v1.14.0

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

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

Jump to

Keyboard shortcuts

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