settings

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package settings is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_settings_settings_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use ListReply.ProtoReflect.Descriptor instead.

func (*ListReply) GetName

func (x *ListReply) GetName() string

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) ProtoReflect

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

func (*ListReply) Reset

func (x *ListReply) Reset()

func (*ListReply) String

func (x *ListReply) String() string

func (*ListReply) Validate

func (m *ListReply) Validate() error

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

func (m *ListReply) ValidateAll() error

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

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

Cause function returns cause value.

func (ListRequestValidationError) Error

Error satisfies the builtin error interface

func (ListRequestValidationError) ErrorName

func (e ListRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ListRequestValidationError) Field

Field function returns field value.

func (ListRequestValidationError) Key

Key function returns key value.

func (ListRequestValidationError) Reason

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use System.ProtoReflect.Descriptor instead.

func (*System) ProtoMessage

func (*System) ProtoMessage()

func (*System) ProtoReflect

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

func (*System) Reset

func (x *System) Reset()

func (*System) String

func (x *System) String() string

func (*System) Validate

func (m *System) Validate() error

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

func (m *System) ValidateAll() error

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) Update

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

Cause function returns cause value.

func (UpdateReplyValidationError) Error

Error satisfies the builtin error interface

func (UpdateReplyValidationError) ErrorName

func (e UpdateReplyValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateReplyValidationError) Field

Field function returns field value.

func (UpdateReplyValidationError) Key

Key function returns key value.

func (UpdateReplyValidationError) Reason

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

Cause function returns cause value.

func (UpdateRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateRequestValidationError) ErrorName

func (e UpdateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (UpdateRequestValidationError) Field

Field function returns field value.

func (UpdateRequestValidationError) Key

Key function returns key value.

func (UpdateRequestValidationError) Reason

Reason function returns reason value.

type Volume

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

func (*Volume) Descriptor deprecated

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

Deprecated: Use Volume.ProtoReflect.Descriptor instead.

func (*Volume) ProtoMessage

func (*Volume) ProtoMessage()

func (*Volume) ProtoReflect

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

func (*Volume) Reset

func (x *Volume) Reset()

func (*Volume) String

func (x *Volume) String() string

func (*Volume) Validate

func (m *Volume) Validate() error

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

func (m *Volume) ValidateAll() error

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.

Jump to

Keyboard shortcuts

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