Documentation ¶
Overview ¶
Package settings is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSettingsAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSettingsAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SettingsAPIClient) error
- func RegisterSettingsAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSettingsAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SettingsAPIServer) error
- func RegisterSettingsAPIServer(s grpc.ServiceRegistrar, srv SettingsAPIServer)
- type GetSettingsRequest
- func (*GetSettingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSettingsRequest) GetDomain() string
- func (x *GetSettingsRequest) GetOwnerId() string
- func (*GetSettingsRequest) ProtoMessage()
- func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message
- func (x *GetSettingsRequest) Reset()
- func (x *GetSettingsRequest) String() string
- type GetSettingsResponse
- func (*GetSettingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSettingsResponse) GetSettings() map[string]*Setting
- func (*GetSettingsResponse) ProtoMessage()
- func (x *GetSettingsResponse) ProtoReflect() protoreflect.Message
- func (x *GetSettingsResponse) Reset()
- func (x *GetSettingsResponse) String() string
- type Setting
- func (*Setting) Descriptor() ([]byte, []int)deprecated
- func (x *Setting) GetDomain() string
- func (x *Setting) GetKey() string
- func (x *Setting) GetValue() string
- func (*Setting) ProtoMessage()
- func (x *Setting) ProtoReflect() protoreflect.Message
- func (x *Setting) Reset()
- func (x *Setting) String() string
- type Settings
- type SettingsAPIClient
- type SettingsAPIServer
- type UnimplementedSettingsAPIServer
- type UnsafeSettingsAPIServer
- type UpdateSettingRequest
- func (*UpdateSettingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSettingRequest) GetOwnerId() string
- func (x *UpdateSettingRequest) GetSettings() map[string]*Setting
- func (*UpdateSettingRequest) ProtoMessage()
- func (x *UpdateSettingRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateSettingRequest) Reset()
- func (x *UpdateSettingRequest) String() string
- type UpdateSettingResponse
- func (*UpdateSettingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSettingResponse) GetSettings() map[string]*Setting
- func (*UpdateSettingResponse) ProtoMessage()
- func (x *UpdateSettingResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateSettingResponse) Reset()
- func (x *UpdateSettingResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_settings_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSettingsAPIHandler ¶
func RegisterSettingsAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSettingsAPIHandler registers the http handlers for service SettingsAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSettingsAPIHandlerClient ¶
func RegisterSettingsAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SettingsAPIClient) error
RegisterSettingsAPIHandlerClient registers the http handlers for service SettingsAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SettingsAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SettingsAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SettingsAPIClient" to call the correct interceptors.
func RegisterSettingsAPIHandlerFromEndpoint ¶
func RegisterSettingsAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSettingsAPIHandlerFromEndpoint is same as RegisterSettingsAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSettingsAPIHandlerServer ¶
func RegisterSettingsAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SettingsAPIServer) error
RegisterSettingsAPIHandlerServer registers the http handlers for service SettingsAPI to "mux". UnaryRPC :call SettingsAPIServer 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 RegisterSettingsAPIHandlerFromEndpoint instead.
func RegisterSettingsAPIServer ¶
func RegisterSettingsAPIServer(s grpc.ServiceRegistrar, srv SettingsAPIServer)
Types ¶
type GetSettingsRequest ¶
type GetSettingsRequest struct { OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` // contains filtered or unexported fields }
func (*GetSettingsRequest) Descriptor
deprecated
func (*GetSettingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSettingsRequest.ProtoReflect.Descriptor instead.
func (*GetSettingsRequest) GetDomain ¶
func (x *GetSettingsRequest) GetDomain() string
func (*GetSettingsRequest) GetOwnerId ¶
func (x *GetSettingsRequest) GetOwnerId() string
func (*GetSettingsRequest) ProtoMessage ¶
func (*GetSettingsRequest) ProtoMessage()
func (*GetSettingsRequest) ProtoReflect ¶
func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message
func (*GetSettingsRequest) Reset ¶
func (x *GetSettingsRequest) Reset()
func (*GetSettingsRequest) String ¶
func (x *GetSettingsRequest) String() string
type GetSettingsResponse ¶
type GetSettingsResponse struct { Settings map[string]*Setting `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetSettingsResponse) Descriptor
deprecated
func (*GetSettingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSettingsResponse.ProtoReflect.Descriptor instead.
func (*GetSettingsResponse) GetSettings ¶
func (x *GetSettingsResponse) GetSettings() map[string]*Setting
func (*GetSettingsResponse) ProtoMessage ¶
func (*GetSettingsResponse) ProtoMessage()
func (*GetSettingsResponse) ProtoReflect ¶
func (x *GetSettingsResponse) ProtoReflect() protoreflect.Message
func (*GetSettingsResponse) Reset ¶
func (x *GetSettingsResponse) Reset()
func (*GetSettingsResponse) String ¶
func (x *GetSettingsResponse) String() string
type Setting ¶
type Setting struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"` // contains filtered or unexported fields }
func (*Setting) Descriptor
deprecated
func (*Setting) ProtoMessage ¶
func (*Setting) ProtoMessage()
func (*Setting) ProtoReflect ¶
func (x *Setting) ProtoReflect() protoreflect.Message
type Settings ¶
type Settings struct { Settings map[string]*Setting `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Settings) Descriptor
deprecated
func (*Settings) GetSettings ¶
func (*Settings) ProtoMessage ¶
func (*Settings) ProtoMessage()
func (*Settings) ProtoReflect ¶
func (x *Settings) ProtoReflect() protoreflect.Message
type SettingsAPIClient ¶
type SettingsAPIClient interface { // Updates a user setting preferences UpdateSetting(ctx context.Context, in *UpdateSettingRequest, opts ...grpc.CallOption) (*UpdateSettingResponse, error) // Retrieves a collection of settings resource GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) }
SettingsAPIClient is the client API for SettingsAPI 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 NewSettingsAPIClient ¶
func NewSettingsAPIClient(cc grpc.ClientConnInterface) SettingsAPIClient
type SettingsAPIServer ¶
type SettingsAPIServer interface { // Updates a user setting preferences UpdateSetting(context.Context, *UpdateSettingRequest) (*UpdateSettingResponse, error) // Retrieves a collection of settings resource GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) // contains filtered or unexported methods }
SettingsAPIServer is the server API for SettingsAPI service. All implementations must embed UnimplementedSettingsAPIServer for forward compatibility
type UnimplementedSettingsAPIServer ¶
type UnimplementedSettingsAPIServer struct { }
UnimplementedSettingsAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedSettingsAPIServer) GetSettings ¶
func (UnimplementedSettingsAPIServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error)
func (UnimplementedSettingsAPIServer) UpdateSetting ¶
func (UnimplementedSettingsAPIServer) UpdateSetting(context.Context, *UpdateSettingRequest) (*UpdateSettingResponse, error)
type UnsafeSettingsAPIServer ¶
type UnsafeSettingsAPIServer interface {
// contains filtered or unexported methods
}
UnsafeSettingsAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SettingsAPIServer will result in compilation errors.
type UpdateSettingRequest ¶
type UpdateSettingRequest struct { OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` Settings map[string]*Setting `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*UpdateSettingRequest) Descriptor
deprecated
func (*UpdateSettingRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSettingRequest.ProtoReflect.Descriptor instead.
func (*UpdateSettingRequest) GetOwnerId ¶
func (x *UpdateSettingRequest) GetOwnerId() string
func (*UpdateSettingRequest) GetSettings ¶
func (x *UpdateSettingRequest) GetSettings() map[string]*Setting
func (*UpdateSettingRequest) ProtoMessage ¶
func (*UpdateSettingRequest) ProtoMessage()
func (*UpdateSettingRequest) ProtoReflect ¶
func (x *UpdateSettingRequest) ProtoReflect() protoreflect.Message
func (*UpdateSettingRequest) Reset ¶
func (x *UpdateSettingRequest) Reset()
func (*UpdateSettingRequest) String ¶
func (x *UpdateSettingRequest) String() string
type UpdateSettingResponse ¶
type UpdateSettingResponse struct { Settings map[string]*Setting `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*UpdateSettingResponse) Descriptor
deprecated
func (*UpdateSettingResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSettingResponse.ProtoReflect.Descriptor instead.
func (*UpdateSettingResponse) GetSettings ¶
func (x *UpdateSettingResponse) GetSettings() map[string]*Setting
func (*UpdateSettingResponse) ProtoMessage ¶
func (*UpdateSettingResponse) ProtoMessage()
func (*UpdateSettingResponse) ProtoReflect ¶
func (x *UpdateSettingResponse) ProtoReflect() protoreflect.Message
func (*UpdateSettingResponse) Reset ¶
func (x *UpdateSettingResponse) Reset()
func (*UpdateSettingResponse) String ¶
func (x *UpdateSettingResponse) String() string