user_settings

package
v0.0.0-...-4b711b1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package user_settings is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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 (*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) GetUserSettings

func (*UnimplementedUserSettingsServiceServer) PutUserSettings

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetConnector

func (x *User) GetConnector() string

func (*User) GetName

func (x *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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.

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.

Jump to

Keyboard shortcuts

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