Documentation
¶
Overview ¶
Package settings is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSettingsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSettingsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SettingsServiceClient) error
- func RegisterSettingsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSettingsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SettingsServiceServer) error
- func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer)
- type ListReply
- func (*ListReply) Descriptor() ([]byte, []int)deprecated
- func (x *ListReply) GetName() string
- func (*ListReply) ProtoMessage()
- func (x *ListReply) ProtoReflect() protoreflect.Message
- func (x *ListReply) Reset()
- func (x *ListReply) String() string
- func (m *ListReply) Validate() error
- func (m *ListReply) ValidateAll() error
- type ListReplyMultiError
- type ListReplyValidationError
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetSystem() *System
- func (x *ListRequest) GetVolume() *Volume
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type SettingsServiceClient
- type SettingsServiceServer
- type System
- type SystemMultiError
- type SystemValidationError
- type UnimplementedSettingsServiceServer
- type UnsafeSettingsServiceServer
- type UpdateReply
- func (*UpdateReply) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateReply) GetMessage() string
- func (*UpdateReply) ProtoMessage()
- func (x *UpdateReply) ProtoReflect() protoreflect.Message
- func (x *UpdateReply) Reset()
- func (x *UpdateReply) String() string
- func (m *UpdateReply) Validate() error
- func (m *UpdateReply) ValidateAll() error
- type UpdateReplyMultiError
- type UpdateReplyValidationError
- func (e UpdateReplyValidationError) Cause() error
- func (e UpdateReplyValidationError) Error() string
- func (e UpdateReplyValidationError) ErrorName() string
- func (e UpdateReplyValidationError) Field() string
- func (e UpdateReplyValidationError) Key() bool
- func (e UpdateReplyValidationError) Reason() string
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- func (m *UpdateRequest) Validate() error
- func (m *UpdateRequest) ValidateAll() error
- type UpdateRequestMultiError
- type UpdateRequestValidationError
- func (e UpdateRequestValidationError) Cause() error
- func (e UpdateRequestValidationError) Error() string
- func (e UpdateRequestValidationError) ErrorName() string
- func (e UpdateRequestValidationError) Field() string
- func (e UpdateRequestValidationError) Key() bool
- func (e UpdateRequestValidationError) Reason() string
- type Volume
- type VolumeMultiError
- type VolumeValidationError
Constants ¶
This section is empty.
Variables ¶
var File_settings_settings_proto protoreflect.FileDescriptor
var SettingsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "settings.SettingsService", HandlerType: (*SettingsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _SettingsService_List_Handler, }, { MethodName: "Update", Handler: _SettingsService_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "settings/settings.proto", }
SettingsService_ServiceDesc is the grpc.ServiceDesc for SettingsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSettingsServiceHandler ¶
func RegisterSettingsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSettingsServiceHandler registers the http handlers for service SettingsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSettingsServiceHandlerClient ¶
func RegisterSettingsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SettingsServiceClient) error
RegisterSettingsServiceHandlerClient registers the http handlers for service SettingsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SettingsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SettingsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SettingsServiceClient" to call the correct interceptors.
func RegisterSettingsServiceHandlerFromEndpoint ¶
func RegisterSettingsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSettingsServiceHandlerFromEndpoint is same as RegisterSettingsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSettingsServiceHandlerServer ¶
func RegisterSettingsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SettingsServiceServer) error
RegisterSettingsServiceHandlerServer registers the http handlers for service SettingsService to "mux". UnaryRPC :call SettingsServiceServer 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 RegisterSettingsServiceHandlerFromEndpoint instead.
func RegisterSettingsServiceServer ¶
func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer)
Types ¶
type ListReply ¶
type ListReply struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*ListReply) Descriptor
deprecated
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
func (*ListReply) ProtoReflect ¶
func (x *ListReply) ProtoReflect() protoreflect.Message
func (*ListReply) Validate ¶
Validate checks the field values on ListReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListReply) ValidateAll ¶
ValidateAll checks the field values on ListReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListReplyMultiError, or nil if none found.
type ListReplyMultiError ¶
type ListReplyMultiError []error
ListReplyMultiError is an error wrapping multiple validation errors returned by ListReply.ValidateAll() if the designated constraints aren't met.
func (ListReplyMultiError) AllErrors ¶
func (m ListReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListReplyMultiError) Error ¶
func (m ListReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListReplyValidationError ¶
type ListReplyValidationError struct {
// contains filtered or unexported fields
}
ListReplyValidationError is the validation error returned by ListReply.Validate if the designated constraints aren't met.
func (ListReplyValidationError) Cause ¶
func (e ListReplyValidationError) Cause() error
Cause function returns cause value.
func (ListReplyValidationError) Error ¶
func (e ListReplyValidationError) Error() string
Error satisfies the builtin error interface
func (ListReplyValidationError) ErrorName ¶
func (e ListReplyValidationError) ErrorName() string
ErrorName returns error name.
func (ListReplyValidationError) Field ¶
func (e ListReplyValidationError) Field() string
Field function returns field value.
func (ListReplyValidationError) Key ¶
func (e ListReplyValidationError) Key() bool
Key function returns key value.
func (ListReplyValidationError) Reason ¶
func (e ListReplyValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct {
System *System `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"`
Volume *Volume `protobuf:"bytes,2,opt,name=volume,proto3" json:"volume,omitempty"`
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetSystem ¶
func (x *ListRequest) GetSystem() *System
func (*ListRequest) GetVolume ¶
func (x *ListRequest) GetVolume() *Volume
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type SettingsServiceClient ¶
type SettingsServiceClient interface {
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateReply, error)
}
SettingsServiceClient is the client API for SettingsService 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 NewSettingsServiceClient ¶
func NewSettingsServiceClient(cc grpc.ClientConnInterface) SettingsServiceClient
type SettingsServiceServer ¶
type SettingsServiceServer interface {
List(context.Context, *ListRequest) (*ListReply, error)
Update(context.Context, *UpdateRequest) (*UpdateReply, error)
}
SettingsServiceServer is the server API for SettingsService service. All implementations should embed UnimplementedSettingsServiceServer for forward compatibility
type System ¶
type System struct {
// contains filtered or unexported fields
}
func (*System) Descriptor
deprecated
func (*System) ProtoMessage ¶
func (*System) ProtoMessage()
func (*System) ProtoReflect ¶
func (x *System) ProtoReflect() protoreflect.Message
func (*System) Validate ¶
Validate checks the field values on System with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*System) ValidateAll ¶
ValidateAll checks the field values on System with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SystemMultiError, or nil if none found.
type SystemMultiError ¶
type SystemMultiError []error
SystemMultiError is an error wrapping multiple validation errors returned by System.ValidateAll() if the designated constraints aren't met.
func (SystemMultiError) AllErrors ¶
func (m SystemMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SystemMultiError) Error ¶
func (m SystemMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SystemValidationError ¶
type SystemValidationError struct {
// contains filtered or unexported fields
}
SystemValidationError is the validation error returned by System.Validate if the designated constraints aren't met.
func (SystemValidationError) Cause ¶
func (e SystemValidationError) Cause() error
Cause function returns cause value.
func (SystemValidationError) Error ¶
func (e SystemValidationError) Error() string
Error satisfies the builtin error interface
func (SystemValidationError) ErrorName ¶
func (e SystemValidationError) ErrorName() string
ErrorName returns error name.
func (SystemValidationError) Field ¶
func (e SystemValidationError) Field() string
Field function returns field value.
func (SystemValidationError) Key ¶
func (e SystemValidationError) Key() bool
Key function returns key value.
func (SystemValidationError) Reason ¶
func (e SystemValidationError) Reason() string
Reason function returns reason value.
type UnimplementedSettingsServiceServer ¶
type UnimplementedSettingsServiceServer struct {
}
UnimplementedSettingsServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedSettingsServiceServer) List ¶
func (UnimplementedSettingsServiceServer) List(context.Context, *ListRequest) (*ListReply, error)
func (UnimplementedSettingsServiceServer) Update ¶
func (UnimplementedSettingsServiceServer) Update(context.Context, *UpdateRequest) (*UpdateReply, error)
type UnsafeSettingsServiceServer ¶
type UnsafeSettingsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSettingsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SettingsServiceServer will result in compilation errors.
type UpdateReply ¶
type UpdateReply struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateReply) Descriptor
deprecated
func (*UpdateReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdateReply.ProtoReflect.Descriptor instead.
func (*UpdateReply) GetMessage ¶
func (x *UpdateReply) GetMessage() string
func (*UpdateReply) ProtoMessage ¶
func (*UpdateReply) ProtoMessage()
func (*UpdateReply) ProtoReflect ¶
func (x *UpdateReply) ProtoReflect() protoreflect.Message
func (*UpdateReply) Reset ¶
func (x *UpdateReply) Reset()
func (*UpdateReply) String ¶
func (x *UpdateReply) String() string
func (*UpdateReply) Validate ¶
func (m *UpdateReply) Validate() error
Validate checks the field values on UpdateReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UpdateReply) ValidateAll ¶
func (m *UpdateReply) ValidateAll() error
ValidateAll checks the field values on UpdateReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateReplyMultiError, or nil if none found.
type UpdateReplyMultiError ¶
type UpdateReplyMultiError []error
UpdateReplyMultiError is an error wrapping multiple validation errors returned by UpdateReply.ValidateAll() if the designated constraints aren't met.
func (UpdateReplyMultiError) AllErrors ¶
func (m UpdateReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateReplyMultiError) Error ¶
func (m UpdateReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateReplyValidationError ¶
type UpdateReplyValidationError struct {
// contains filtered or unexported fields
}
UpdateReplyValidationError is the validation error returned by UpdateReply.Validate if the designated constraints aren't met.
func (UpdateReplyValidationError) Cause ¶
func (e UpdateReplyValidationError) Cause() error
Cause function returns cause value.
func (UpdateReplyValidationError) Error ¶
func (e UpdateReplyValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateReplyValidationError) ErrorName ¶
func (e UpdateReplyValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateReplyValidationError) Field ¶
func (e UpdateReplyValidationError) Field() string
Field function returns field value.
func (UpdateReplyValidationError) Key ¶
func (e UpdateReplyValidationError) Key() bool
Key function returns key value.
func (UpdateReplyValidationError) Reason ¶
func (e UpdateReplyValidationError) Reason() string
Reason function returns reason value.
type UpdateRequest ¶
type UpdateRequest struct {
// contains filtered or unexported fields
}
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
func (*UpdateRequest) Validate ¶
func (m *UpdateRequest) Validate() error
Validate checks the field values on UpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UpdateRequest) ValidateAll ¶
func (m *UpdateRequest) ValidateAll() error
ValidateAll checks the field values on UpdateRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateRequestMultiError, or nil if none found.
type UpdateRequestMultiError ¶
type UpdateRequestMultiError []error
UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateRequestMultiError) AllErrors ¶
func (m UpdateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateRequestMultiError) Error ¶
func (m UpdateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateRequestValidationError ¶
type UpdateRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.
func (UpdateRequestValidationError) Cause ¶
func (e UpdateRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateRequestValidationError) Error ¶
func (e UpdateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateRequestValidationError) ErrorName ¶
func (e UpdateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateRequestValidationError) Field ¶
func (e UpdateRequestValidationError) Field() string
Field function returns field value.
func (UpdateRequestValidationError) Key ¶
func (e UpdateRequestValidationError) Key() bool
Key function returns key value.
func (UpdateRequestValidationError) Reason ¶
func (e UpdateRequestValidationError) Reason() string
Reason function returns reason value.
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
func (*Volume) Descriptor
deprecated
func (*Volume) ProtoMessage ¶
func (*Volume) ProtoMessage()
func (*Volume) ProtoReflect ¶
func (x *Volume) ProtoReflect() protoreflect.Message
func (*Volume) Validate ¶
Validate checks the field values on Volume with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Volume) ValidateAll ¶
ValidateAll checks the field values on Volume with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in VolumeMultiError, or nil if none found.
type VolumeMultiError ¶
type VolumeMultiError []error
VolumeMultiError is an error wrapping multiple validation errors returned by Volume.ValidateAll() if the designated constraints aren't met.
func (VolumeMultiError) AllErrors ¶
func (m VolumeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VolumeMultiError) Error ¶
func (m VolumeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VolumeValidationError ¶
type VolumeValidationError struct {
// contains filtered or unexported fields
}
VolumeValidationError is the validation error returned by Volume.Validate if the designated constraints aren't met.
func (VolumeValidationError) Cause ¶
func (e VolumeValidationError) Cause() error
Cause function returns cause value.
func (VolumeValidationError) Error ¶
func (e VolumeValidationError) Error() string
Error satisfies the builtin error interface
func (VolumeValidationError) ErrorName ¶
func (e VolumeValidationError) ErrorName() string
ErrorName returns error name.
func (VolumeValidationError) Field ¶
func (e VolumeValidationError) Field() string
Field function returns field value.
func (VolumeValidationError) Key ¶
func (e VolumeValidationError) Key() bool
Key function returns key value.
func (VolumeValidationError) Reason ¶
func (e VolumeValidationError) Reason() string
Reason function returns reason value.