configv1

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package configv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ConfigsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "config.v1.ConfigsService",
	HandlerType: (*ConfigsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConfigs",
			Handler:    _ConfigsService_GetConfigs_Handler,
		},
		{
			MethodName: "GetConfig",
			Handler:    _ConfigsService_GetConfig_Handler,
		},
		{
			MethodName: "CreateConfig",
			Handler:    _ConfigsService_CreateConfig_Handler,
		},
		{
			MethodName: "UpdateConfig",
			Handler:    _ConfigsService_UpdateConfig_Handler,
		},
		{
			MethodName: "DeleteConfig",
			Handler:    _ConfigsService_DeleteConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "config/v1/config.proto",
}

ConfigsService_ServiceDesc is the grpc.ServiceDesc for ConfigsService 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_config_v1_config_proto protoreflect.FileDescriptor

Functions

func RegisterConfigsServiceHandler

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

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

func RegisterConfigsServiceHandlerClient

func RegisterConfigsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigsServiceClient) error

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

func RegisterConfigsServiceHandlerFromEndpoint

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

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

func RegisterConfigsServiceHandlerServer

func RegisterConfigsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigsServiceServer) error

RegisterConfigsServiceHandlerServer registers the http handlers for service ConfigsService to "mux". UnaryRPC :call ConfigsServiceServer 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 RegisterConfigsServiceHandlerFromEndpoint instead.

func RegisterConfigsServiceServer

func RegisterConfigsServiceServer(s grpc.ServiceRegistrar, srv ConfigsServiceServer)

Types

type Config

type Config struct {
	ID           string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	DefaultDest  string `protobuf:"bytes,2,opt,name=DefaultDest,proto3" json:"DefaultDest,omitempty"`
	NodeOperator string `protobuf:"bytes,3,opt,name=NodeOperator,proto3" json:"NodeOperator,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDefaultDest

func (x *Config) GetDefaultDest() string

func (*Config) GetID

func (x *Config) GetID() string

func (*Config) GetNodeOperator

func (x *Config) GetNodeOperator() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type ConfigsServiceClient

type ConfigsServiceClient interface {
	GetConfigs(ctx context.Context, in *GetConfigsRequest, opts ...grpc.CallOption) (*GetConfigsResponse, error)
	GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
	CreateConfig(ctx context.Context, in *CreateConfigRequest, opts ...grpc.CallOption) (*CreateConfigResponse, error)
	UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error)
	DeleteConfig(ctx context.Context, in *DeleteConfigRequest, opts ...grpc.CallOption) (*DeleteConfigResponse, error)
}

ConfigsServiceClient is the client API for ConfigsService 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 ConfigsServiceServer

ConfigsServiceServer is the server API for ConfigsService service. All implementations should embed UnimplementedConfigsServiceServer for forward compatibility

type CreateConfigRequest

type CreateConfigRequest struct {
	Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateConfigRequest) Descriptor deprecated

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

Deprecated: Use CreateConfigRequest.ProtoReflect.Descriptor instead.

func (*CreateConfigRequest) GetConfig

func (x *CreateConfigRequest) GetConfig() *Config

func (*CreateConfigRequest) ProtoMessage

func (*CreateConfigRequest) ProtoMessage()

func (*CreateConfigRequest) ProtoReflect

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

func (*CreateConfigRequest) Reset

func (x *CreateConfigRequest) Reset()

func (*CreateConfigRequest) String

func (x *CreateConfigRequest) String() string

type CreateConfigResponse

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

func (*CreateConfigResponse) Descriptor deprecated

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

Deprecated: Use CreateConfigResponse.ProtoReflect.Descriptor instead.

func (*CreateConfigResponse) ProtoMessage

func (*CreateConfigResponse) ProtoMessage()

func (*CreateConfigResponse) ProtoReflect

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

func (*CreateConfigResponse) Reset

func (x *CreateConfigResponse) Reset()

func (*CreateConfigResponse) String

func (x *CreateConfigResponse) String() string

type DeleteConfigRequest

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

func (*DeleteConfigRequest) Descriptor deprecated

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

Deprecated: Use DeleteConfigRequest.ProtoReflect.Descriptor instead.

func (*DeleteConfigRequest) GetID

func (x *DeleteConfigRequest) GetID() string

func (*DeleteConfigRequest) ProtoMessage

func (*DeleteConfigRequest) ProtoMessage()

func (*DeleteConfigRequest) ProtoReflect

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

func (*DeleteConfigRequest) Reset

func (x *DeleteConfigRequest) Reset()

func (*DeleteConfigRequest) String

func (x *DeleteConfigRequest) String() string

type DeleteConfigResponse

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

func (*DeleteConfigResponse) Descriptor deprecated

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

Deprecated: Use DeleteConfigResponse.ProtoReflect.Descriptor instead.

func (*DeleteConfigResponse) ProtoMessage

func (*DeleteConfigResponse) ProtoMessage()

func (*DeleteConfigResponse) ProtoReflect

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

func (*DeleteConfigResponse) Reset

func (x *DeleteConfigResponse) Reset()

func (*DeleteConfigResponse) String

func (x *DeleteConfigResponse) String() string

type GetConfigRequest

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

func (*GetConfigRequest) Descriptor deprecated

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

Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead.

func (*GetConfigRequest) GetID

func (x *GetConfigRequest) GetID() 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 {
	Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*GetConfigResponse) Descriptor deprecated

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

Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.

func (*GetConfigResponse) GetConfig

func (x *GetConfigResponse) GetConfig() *Config

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 GetConfigsRequest

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

func (*GetConfigsRequest) Descriptor deprecated

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

Deprecated: Use GetConfigsRequest.ProtoReflect.Descriptor instead.

func (*GetConfigsRequest) ProtoMessage

func (*GetConfigsRequest) ProtoMessage()

func (*GetConfigsRequest) ProtoReflect

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

func (*GetConfigsRequest) Reset

func (x *GetConfigsRequest) Reset()

func (*GetConfigsRequest) String

func (x *GetConfigsRequest) String() string

type GetConfigsResponse

type GetConfigsResponse struct {
	Configs []*Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"`
	// contains filtered or unexported fields
}

func (*GetConfigsResponse) Descriptor deprecated

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

Deprecated: Use GetConfigsResponse.ProtoReflect.Descriptor instead.

func (*GetConfigsResponse) GetConfigs

func (x *GetConfigsResponse) GetConfigs() []*Config

func (*GetConfigsResponse) ProtoMessage

func (*GetConfigsResponse) ProtoMessage()

func (*GetConfigsResponse) ProtoReflect

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

func (*GetConfigsResponse) Reset

func (x *GetConfigsResponse) Reset()

func (*GetConfigsResponse) String

func (x *GetConfigsResponse) String() string

type UnimplementedConfigsServiceServer

type UnimplementedConfigsServiceServer struct {
}

UnimplementedConfigsServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedConfigsServiceServer) CreateConfig

func (UnimplementedConfigsServiceServer) DeleteConfig

func (UnimplementedConfigsServiceServer) GetConfig

func (UnimplementedConfigsServiceServer) GetConfigs

func (UnimplementedConfigsServiceServer) UpdateConfig

type UnsafeConfigsServiceServer

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

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

type UpdateConfigRequest

type UpdateConfigRequest struct {
	Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateConfigRequest) Descriptor deprecated

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

Deprecated: Use UpdateConfigRequest.ProtoReflect.Descriptor instead.

func (*UpdateConfigRequest) GetConfig

func (x *UpdateConfigRequest) GetConfig() *Config

func (*UpdateConfigRequest) ProtoMessage

func (*UpdateConfigRequest) ProtoMessage()

func (*UpdateConfigRequest) ProtoReflect

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

func (*UpdateConfigRequest) Reset

func (x *UpdateConfigRequest) Reset()

func (*UpdateConfigRequest) String

func (x *UpdateConfigRequest) String() string

type UpdateConfigResponse

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

func (*UpdateConfigResponse) Descriptor deprecated

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

Deprecated: Use UpdateConfigResponse.ProtoReflect.Descriptor instead.

func (*UpdateConfigResponse) ProtoMessage

func (*UpdateConfigResponse) ProtoMessage()

func (*UpdateConfigResponse) ProtoReflect

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

func (*UpdateConfigResponse) Reset

func (x *UpdateConfigResponse) Reset()

func (*UpdateConfigResponse) String

func (x *UpdateConfigResponse) String() string

Jump to

Keyboard shortcuts

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