Documentation ¶
Overview ¶
Package configv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterConfigsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConfigsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigsServiceClient) error
- func RegisterConfigsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConfigsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigsServiceServer) error
- func RegisterConfigsServiceServer(s grpc.ServiceRegistrar, srv ConfigsServiceServer)
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetDefaultDest() string
- func (x *Config) GetID() string
- func (x *Config) GetNodeOperator() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type ConfigsServiceClient
- type ConfigsServiceServer
- type CreateConfigRequest
- func (*CreateConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateConfigRequest) GetConfig() *Config
- func (*CreateConfigRequest) ProtoMessage()
- func (x *CreateConfigRequest) ProtoReflect() protoreflect.Message
- func (x *CreateConfigRequest) Reset()
- func (x *CreateConfigRequest) String() string
- type CreateConfigResponse
- type DeleteConfigRequest
- func (*DeleteConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteConfigRequest) GetID() string
- func (*DeleteConfigRequest) ProtoMessage()
- func (x *DeleteConfigRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteConfigRequest) Reset()
- func (x *DeleteConfigRequest) String() string
- type DeleteConfigResponse
- type GetConfigRequest
- type GetConfigResponse
- type GetConfigsRequest
- type GetConfigsResponse
- func (*GetConfigsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetConfigsResponse) GetConfigs() []*Config
- func (*GetConfigsResponse) ProtoMessage()
- func (x *GetConfigsResponse) ProtoReflect() protoreflect.Message
- func (x *GetConfigsResponse) Reset()
- func (x *GetConfigsResponse) String() string
- type UnimplementedConfigsServiceServer
- func (UnimplementedConfigsServiceServer) CreateConfig(context.Context, *CreateConfigRequest) (*CreateConfigResponse, error)
- func (UnimplementedConfigsServiceServer) DeleteConfig(context.Context, *DeleteConfigRequest) (*DeleteConfigResponse, error)
- func (UnimplementedConfigsServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
- func (UnimplementedConfigsServiceServer) GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error)
- func (UnimplementedConfigsServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error)
- type UnsafeConfigsServiceServer
- type UpdateConfigRequest
- func (*UpdateConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateConfigRequest) GetConfig() *Config
- func (*UpdateConfigRequest) ProtoMessage()
- func (x *UpdateConfigRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateConfigRequest) Reset()
- func (x *UpdateConfigRequest) String() string
- type UpdateConfigResponse
Constants ¶
This section is empty.
Variables ¶
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)
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) GetDefaultDest ¶
func (*Config) GetNodeOperator ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
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.
func NewConfigsServiceClient ¶
func NewConfigsServiceClient(cc grpc.ClientConnInterface) ConfigsServiceClient
type ConfigsServiceServer ¶
type ConfigsServiceServer interface { GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) CreateConfig(context.Context, *CreateConfigRequest) (*CreateConfigResponse, error) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) DeleteConfig(context.Context, *DeleteConfigRequest) (*DeleteConfigResponse, error) }
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) CreateConfig(context.Context, *CreateConfigRequest) (*CreateConfigResponse, error)
func (UnimplementedConfigsServiceServer) DeleteConfig ¶
func (UnimplementedConfigsServiceServer) DeleteConfig(context.Context, *DeleteConfigRequest) (*DeleteConfigResponse, error)
func (UnimplementedConfigsServiceServer) GetConfig ¶
func (UnimplementedConfigsServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
func (UnimplementedConfigsServiceServer) GetConfigs ¶
func (UnimplementedConfigsServiceServer) GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error)
func (UnimplementedConfigsServiceServer) UpdateConfig ¶
func (UnimplementedConfigsServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error)
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