settings

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 18 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_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) Descriptor() ([]byte, []int)

Deprecated: Use Setting.ProtoReflect.Descriptor instead.

func (*Setting) GetDomain

func (x *Setting) GetDomain() string

func (*Setting) GetKey

func (x *Setting) GetKey() string

func (*Setting) GetValue

func (x *Setting) GetValue() string

func (*Setting) ProtoMessage

func (*Setting) ProtoMessage()

func (*Setting) ProtoReflect

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

func (*Setting) Reset

func (x *Setting) Reset()

func (*Setting) String

func (x *Setting) String() string

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

Deprecated: Use Settings.ProtoReflect.Descriptor instead.

func (*Settings) GetSettings

func (x *Settings) GetSettings() map[string]*Setting

func (*Settings) ProtoMessage

func (*Settings) ProtoMessage()

func (*Settings) ProtoReflect

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

func (*Settings) Reset

func (x *Settings) Reset()

func (*Settings) String

func (x *Settings) String() string

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.

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

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

Jump to

Keyboard shortcuts

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