Documentation ¶
Overview ¶
Package user_settings is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserSettingsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserSettingsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserSettingsServiceClient) error
- func RegisterUserSettingsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserSettingsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserSettingsServiceServer) error
- func RegisterUserSettingsServiceServer(s *grpc.Server, srv UserSettingsServiceServer)
- type DeleteUserSettingsRequest
- func (*DeleteUserSettingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserSettingsRequest) GetUser() *User
- func (*DeleteUserSettingsRequest) ProtoMessage()
- func (x *DeleteUserSettingsRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserSettingsRequest) Reset()
- func (x *DeleteUserSettingsRequest) String() string
- type GetUserSettingsRequest
- func (*GetUserSettingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserSettingsRequest) GetUser() *User
- func (*GetUserSettingsRequest) ProtoMessage()
- func (x *GetUserSettingsRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserSettingsRequest) Reset()
- func (x *GetUserSettingsRequest) String() string
- type GetUserSettingsResponse
- func (*GetUserSettingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserSettingsResponse) GetSettings() map[string]*UserSettingValue
- func (x *GetUserSettingsResponse) GetUser() *User
- func (*GetUserSettingsResponse) ProtoMessage()
- func (x *GetUserSettingsResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserSettingsResponse) Reset()
- func (x *GetUserSettingsResponse) String() string
- type PutUserSettingsRequest
- func (*PutUserSettingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutUserSettingsRequest) GetSettings() map[string]*UserSettingValue
- func (x *PutUserSettingsRequest) GetUser() *User
- func (*PutUserSettingsRequest) ProtoMessage()
- func (x *PutUserSettingsRequest) ProtoReflect() protoreflect.Message
- func (x *PutUserSettingsRequest) Reset()
- func (x *PutUserSettingsRequest) String() string
- type PutUserSettingsResponse
- func (*PutUserSettingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PutUserSettingsResponse) GetUser() *User
- func (*PutUserSettingsResponse) ProtoMessage()
- func (x *PutUserSettingsResponse) ProtoReflect() protoreflect.Message
- func (x *PutUserSettingsResponse) Reset()
- func (x *PutUserSettingsResponse) String() string
- type UnimplementedUserSettingsServiceServer
- func (*UnimplementedUserSettingsServiceServer) DeleteUserSettings(context.Context, *DeleteUserSettingsRequest) (*emptypb.Empty, error)
- func (*UnimplementedUserSettingsServiceServer) GetUserSettings(context.Context, *GetUserSettingsRequest) (*GetUserSettingsResponse, error)
- func (*UnimplementedUserSettingsServiceServer) PutUserSettings(context.Context, *PutUserSettingsRequest) (*PutUserSettingsResponse, error)
- type User
- type UserSettingValue
- func (*UserSettingValue) Descriptor() ([]byte, []int)deprecated
- func (x *UserSettingValue) GetDefaultValue() string
- func (x *UserSettingValue) GetEnabled() bool
- func (x *UserSettingValue) GetValidValues() []string
- func (x *UserSettingValue) GetValue() string
- func (*UserSettingValue) ProtoMessage()
- func (x *UserSettingValue) ProtoReflect() protoreflect.Message
- func (x *UserSettingValue) Reset()
- func (x *UserSettingValue) String() string
- type UserSettingsServiceClient
- type UserSettingsServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_external_user_settings_user_settings_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUserSettingsServiceHandler ¶
func RegisterUserSettingsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserSettingsServiceHandler registers the http handlers for service UserSettingsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserSettingsServiceHandlerClient ¶
func RegisterUserSettingsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserSettingsServiceClient) error
RegisterUserSettingsServiceHandlerClient registers the http handlers for service UserSettingsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserSettingsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserSettingsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserSettingsServiceClient" to call the correct interceptors.
func RegisterUserSettingsServiceHandlerFromEndpoint ¶
func RegisterUserSettingsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserSettingsServiceHandlerFromEndpoint is same as RegisterUserSettingsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserSettingsServiceHandlerServer ¶
func RegisterUserSettingsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserSettingsServiceServer) error
RegisterUserSettingsServiceHandlerServer registers the http handlers for service UserSettingsService to "mux". UnaryRPC :call UserSettingsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterUserSettingsServiceServer ¶
func RegisterUserSettingsServiceServer(s *grpc.Server, srv UserSettingsServiceServer)
Types ¶
type DeleteUserSettingsRequest ¶
type DeleteUserSettingsRequest struct { // ID of the user. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserSettingsRequest) Descriptor
deprecated
func (*DeleteUserSettingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserSettingsRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserSettingsRequest) GetUser ¶
func (x *DeleteUserSettingsRequest) GetUser() *User
func (*DeleteUserSettingsRequest) ProtoMessage ¶
func (*DeleteUserSettingsRequest) ProtoMessage()
func (*DeleteUserSettingsRequest) ProtoReflect ¶
func (x *DeleteUserSettingsRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserSettingsRequest) Reset ¶
func (x *DeleteUserSettingsRequest) Reset()
func (*DeleteUserSettingsRequest) String ¶
func (x *DeleteUserSettingsRequest) String() string
type GetUserSettingsRequest ¶
type GetUserSettingsRequest struct { // The user to get settings for User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetUserSettingsRequest) Descriptor
deprecated
func (*GetUserSettingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserSettingsRequest.ProtoReflect.Descriptor instead.
func (*GetUserSettingsRequest) GetUser ¶
func (x *GetUserSettingsRequest) GetUser() *User
func (*GetUserSettingsRequest) ProtoMessage ¶
func (*GetUserSettingsRequest) ProtoMessage()
func (*GetUserSettingsRequest) ProtoReflect ¶
func (x *GetUserSettingsRequest) ProtoReflect() protoreflect.Message
func (*GetUserSettingsRequest) Reset ¶
func (x *GetUserSettingsRequest) Reset()
func (*GetUserSettingsRequest) String ¶
func (x *GetUserSettingsRequest) String() string
type GetUserSettingsResponse ¶
type GetUserSettingsResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Settings map[string]*UserSettingValue `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetUserSettingsResponse) Descriptor
deprecated
func (*GetUserSettingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserSettingsResponse.ProtoReflect.Descriptor instead.
func (*GetUserSettingsResponse) GetSettings ¶
func (x *GetUserSettingsResponse) GetSettings() map[string]*UserSettingValue
func (*GetUserSettingsResponse) GetUser ¶
func (x *GetUserSettingsResponse) GetUser() *User
func (*GetUserSettingsResponse) ProtoMessage ¶
func (*GetUserSettingsResponse) ProtoMessage()
func (*GetUserSettingsResponse) ProtoReflect ¶
func (x *GetUserSettingsResponse) ProtoReflect() protoreflect.Message
func (*GetUserSettingsResponse) Reset ¶
func (x *GetUserSettingsResponse) Reset()
func (*GetUserSettingsResponse) String ¶
func (x *GetUserSettingsResponse) String() string
type PutUserSettingsRequest ¶
type PutUserSettingsRequest struct { // ID of the user. Cannot be changed. Used to sign in. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // The user settings to persist. Settings map[string]*UserSettingValue `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*PutUserSettingsRequest) Descriptor
deprecated
func (*PutUserSettingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutUserSettingsRequest.ProtoReflect.Descriptor instead.
func (*PutUserSettingsRequest) GetSettings ¶
func (x *PutUserSettingsRequest) GetSettings() map[string]*UserSettingValue
func (*PutUserSettingsRequest) GetUser ¶
func (x *PutUserSettingsRequest) GetUser() *User
func (*PutUserSettingsRequest) ProtoMessage ¶
func (*PutUserSettingsRequest) ProtoMessage()
func (*PutUserSettingsRequest) ProtoReflect ¶
func (x *PutUserSettingsRequest) ProtoReflect() protoreflect.Message
func (*PutUserSettingsRequest) Reset ¶
func (x *PutUserSettingsRequest) Reset()
func (*PutUserSettingsRequest) String ¶
func (x *PutUserSettingsRequest) String() string
type PutUserSettingsResponse ¶
type PutUserSettingsResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*PutUserSettingsResponse) Descriptor
deprecated
func (*PutUserSettingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutUserSettingsResponse.ProtoReflect.Descriptor instead.
func (*PutUserSettingsResponse) GetUser ¶
func (x *PutUserSettingsResponse) GetUser() *User
func (*PutUserSettingsResponse) ProtoMessage ¶
func (*PutUserSettingsResponse) ProtoMessage()
func (*PutUserSettingsResponse) ProtoReflect ¶
func (x *PutUserSettingsResponse) ProtoReflect() protoreflect.Message
func (*PutUserSettingsResponse) Reset ¶
func (x *PutUserSettingsResponse) Reset()
func (*PutUserSettingsResponse) String ¶
func (x *PutUserSettingsResponse) String() string
type UnimplementedUserSettingsServiceServer ¶
type UnimplementedUserSettingsServiceServer struct { }
UnimplementedUserSettingsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedUserSettingsServiceServer) DeleteUserSettings ¶
func (*UnimplementedUserSettingsServiceServer) DeleteUserSettings(context.Context, *DeleteUserSettingsRequest) (*emptypb.Empty, error)
func (*UnimplementedUserSettingsServiceServer) GetUserSettings ¶
func (*UnimplementedUserSettingsServiceServer) GetUserSettings(context.Context, *GetUserSettingsRequest) (*GetUserSettingsResponse, error)
func (*UnimplementedUserSettingsServiceServer) PutUserSettings ¶
func (*UnimplementedUserSettingsServiceServer) PutUserSettings(context.Context, *PutUserSettingsRequest) (*PutUserSettingsResponse, error)
type User ¶
type User struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Connector string `protobuf:"bytes,2,opt,name=connector,proto3" json:"connector,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetConnector ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserSettingValue ¶
type UserSettingValue struct { // Default value for this setting. DefaultValue string `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` // Value for this setting. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Enabled Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` // Valid values for this setting. ValidValues []string `protobuf:"bytes,4,rep,name=valid_values,json=validValues,proto3" json:"valid_values,omitempty"` // contains filtered or unexported fields }
func (*UserSettingValue) Descriptor
deprecated
func (*UserSettingValue) Descriptor() ([]byte, []int)
Deprecated: Use UserSettingValue.ProtoReflect.Descriptor instead.
func (*UserSettingValue) GetDefaultValue ¶
func (x *UserSettingValue) GetDefaultValue() string
func (*UserSettingValue) GetEnabled ¶
func (x *UserSettingValue) GetEnabled() bool
func (*UserSettingValue) GetValidValues ¶
func (x *UserSettingValue) GetValidValues() []string
func (*UserSettingValue) GetValue ¶
func (x *UserSettingValue) GetValue() string
func (*UserSettingValue) ProtoMessage ¶
func (*UserSettingValue) ProtoMessage()
func (*UserSettingValue) ProtoReflect ¶
func (x *UserSettingValue) ProtoReflect() protoreflect.Message
func (*UserSettingValue) Reset ¶
func (x *UserSettingValue) Reset()
func (*UserSettingValue) String ¶
func (x *UserSettingValue) String() string
type UserSettingsServiceClient ¶
type UserSettingsServiceClient interface { // GetUserSettings returns all of the preferences for a given user GetUserSettings(ctx context.Context, in *GetUserSettingsRequest, opts ...grpc.CallOption) (*GetUserSettingsResponse, error) // PutUserSettings upserts all of the preferences for a given user PutUserSettings(ctx context.Context, in *PutUserSettingsRequest, opts ...grpc.CallOption) (*PutUserSettingsResponse, error) // DeleteUserSettings deletes all settings for a given user DeleteUserSettings(ctx context.Context, in *DeleteUserSettingsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
UserSettingsServiceClient is the client API for UserSettingsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserSettingsServiceClient ¶
func NewUserSettingsServiceClient(cc grpc.ClientConnInterface) UserSettingsServiceClient
type UserSettingsServiceServer ¶
type UserSettingsServiceServer interface { // GetUserSettings returns all of the preferences for a given user GetUserSettings(context.Context, *GetUserSettingsRequest) (*GetUserSettingsResponse, error) // PutUserSettings upserts all of the preferences for a given user PutUserSettings(context.Context, *PutUserSettingsRequest) (*PutUserSettingsResponse, error) // DeleteUserSettings deletes all settings for a given user DeleteUserSettings(context.Context, *DeleteUserSettingsRequest) (*emptypb.Empty, error) }
UserSettingsServiceServer is the server API for UserSettingsService service.