Documentation
¶
Overview ¶
Package useridpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserRaftServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserRaftServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserRaftServiceClient) error
- func RegisterUserRaftServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserRaftServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserRaftServiceServer) error
- func RegisterUserRaftServiceServer(s grpc.ServiceRegistrar, srv UserRaftServiceServer)
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type Attribute
- func (*Attribute) Descriptor() ([]byte, []int)deprecated
- func (x *Attribute) GetDefaultTtl() int32
- func (x *Attribute) GetIndexed() bool
- func (x *Attribute) GetName() string
- func (x *Attribute) GetPii() bool
- func (x *Attribute) GetUnique() bool
- func (*Attribute) ProtoMessage()
- func (x *Attribute) ProtoReflect() protoreflect.Message
- func (x *Attribute) Reset()
- func (x *Attribute) String() string
- type AttributeEntry
- func (*AttributeEntry) Descriptor() ([]byte, []int)deprecated
- func (x *AttributeEntry) GetName() string
- func (x *AttributeEntry) GetTtl() int32
- func (x *AttributeEntry) GetValue() string
- func (*AttributeEntry) ProtoMessage()
- func (x *AttributeEntry) ProtoReflect() protoreflect.Message
- func (x *AttributeEntry) Reset()
- func (x *AttributeEntry) String() string
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetCreateReq() *CreateRequest
- func (x *Command) GetDeleteReq() *DeleteRequest
- func (x *Command) GetOperation() CommandOperation
- func (x *Command) GetSchemeReq() *SchemeRequest
- func (x *Command) GetUpdateReq() *UpdateRequest
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type CommandOperation
- func (CommandOperation) Descriptor() protoreflect.EnumDescriptor
- func (x CommandOperation) Enum() *CommandOperation
- func (CommandOperation) EnumDescriptor() ([]byte, []int)deprecated
- func (x CommandOperation) Number() protoreflect.EnumNumber
- func (x CommandOperation) String() string
- func (CommandOperation) Type() protoreflect.EnumType
- type Content
- type CreateRequest
- type DeleteRequest
- type GetRequest
- type LookupRequest
- func (*LookupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LookupRequest) GetAttribute() string
- func (x *LookupRequest) GetKey() string
- func (x *LookupRequest) GetLookupType() LookupType
- func (x *LookupRequest) GetSelectAttributes() []string
- func (*LookupRequest) ProtoMessage()
- func (x *LookupRequest) ProtoReflect() protoreflect.Message
- func (x *LookupRequest) Reset()
- func (x *LookupRequest) String() string
- type LookupType
- type Metadata
- type RaftConfiguration
- func (*RaftConfiguration) Descriptor() ([]byte, []int)deprecated
- func (x *RaftConfiguration) GetLastIndex() uint64
- func (x *RaftConfiguration) GetServerList() []*RaftServer
- func (x *RaftConfiguration) GetState() string
- func (*RaftConfiguration) ProtoMessage()
- func (x *RaftConfiguration) ProtoReflect() protoreflect.Message
- func (x *RaftConfiguration) Reset()
- func (x *RaftConfiguration) String() string
- type RaftNode
- type RaftServer
- func (*RaftServer) Descriptor() ([]byte, []int)deprecated
- func (x *RaftServer) GetGrpcAddr() string
- func (x *RaftServer) GetNodeId() string
- func (x *RaftServer) GetRaftAddr() string
- func (x *RaftServer) GetSuffrage() string
- func (*RaftServer) ProtoMessage()
- func (x *RaftServer) ProtoReflect() protoreflect.Message
- func (x *RaftServer) Reset()
- func (x *RaftServer) String() string
- type ScanRequest
- func (*ScanRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScanRequest) GetLimit() int32
- func (x *ScanRequest) GetPrefix() string
- func (x *ScanRequest) GetSeek() string
- func (x *ScanRequest) GetSelectAttributes() []string
- func (*ScanRequest) ProtoMessage()
- func (x *ScanRequest) ProtoReflect() protoreflect.Message
- func (x *ScanRequest) Reset()
- func (x *ScanRequest) String() string
- type SchemeRequest
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetAttribute() string
- func (x *SearchRequest) GetKey() string
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type Status
- type UnimplementedUserRaftServiceServer
- func (UnimplementedUserRaftServiceServer) ApplyCommand(context.Context, *Command) (*Status, error)
- func (UnimplementedUserRaftServiceServer) Bootstrap(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedUserRaftServiceServer) GetConfiguration(context.Context, *emptypb.Empty) (*RaftConfiguration, error)
- func (UnimplementedUserRaftServiceServer) Join(context.Context, *RaftNode) (*emptypb.Empty, error)
- func (UnimplementedUserRaftServiceServer) Recover(UserRaftService_RecoverServer) error
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) Create(context.Context, *CreateRequest) (*UserEntry, error)
- func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Get(context.Context, *GetRequest) (*UserEntry, error)
- func (UnimplementedUserServiceServer) GetMetadata(context.Context, *emptypb.Empty) (*Metadata, error)
- func (UnimplementedUserServiceServer) Lookup(context.Context, *LookupRequest) (*UserEntry, error)
- func (UnimplementedUserServiceServer) Scan(*ScanRequest, UserService_ScanServer) error
- func (UnimplementedUserServiceServer) Search(*SearchRequest, UserService_SearchServer) error
- func (UnimplementedUserServiceServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) UpdateScheme(context.Context, *SchemeRequest) (*emptypb.Empty, error)
- type UnsafeUserRaftServiceServer
- type UnsafeUserServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetAttributes() []*AttributeEntry
- func (x *UpdateRequest) GetCas() bool
- func (x *UpdateRequest) GetCasVersion() int64
- func (x *UpdateRequest) GetUpdateType() UpdateType
- func (x *UpdateRequest) GetUserId() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateType
- type UserEntry
- func (*UserEntry) Descriptor() ([]byte, []int)deprecated
- func (x *UserEntry) GetAttributes() []*AttributeEntry
- func (x *UserEntry) GetUserId() string
- func (x *UserEntry) GetVersion() int64
- func (*UserEntry) ProtoMessage()
- func (x *UserEntry) ProtoReflect() protoreflect.Message
- func (x *UserEntry) Reset()
- func (x *UserEntry) String() string
- type UserRaftServiceClient
- type UserRaftServiceServer
- type UserRaftService_RecoverClient
- type UserRaftService_RecoverServer
- type UserServiceClient
- type UserServiceServer
- type UserService_ScanClient
- type UserService_ScanServer
- type UserService_SearchClient
- type UserService_SearchServer
Constants ¶
This section is empty.
Variables ¶
var ( LookupType_name = map[int32]string{ 0: "UNKNOWN_LOOKUP", 1: "BY_USER", 2: "BY_ATTRIBUTE", } LookupType_value = map[string]int32{ "UNKNOWN_LOOKUP": 0, "BY_USER": 1, "BY_ATTRIBUTE": 2, } )
Enum value maps for LookupType.
var ( UpdateType_name = map[int32]string{ 0: "UNKNOWN_TYPE", 1: "MERGE", 2: "REPLACE", } UpdateType_value = map[string]int32{ "UNKNOWN_TYPE": 0, "MERGE": 1, "REPLACE": 2, } )
Enum value maps for UpdateType.
var ( CommandOperation_name = map[int32]string{ 0: "UNKNOWN_OP", 1: "SCHEME_OP", 2: "CREATE_OP", 3: "UPDATE_OP", 4: "DELETE_OP", } CommandOperation_value = map[string]int32{ "UNKNOWN_OP": 0, "SCHEME_OP": 1, "CREATE_OP": 2, "UPDATE_OP": 3, "DELETE_OP": 4, } )
Enum value maps for CommandOperation.
var File_user_service_proto protoreflect.FileDescriptor
var UserRaftService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "userid.UserRaftService", HandlerType: (*UserRaftServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Bootstrap", Handler: _UserRaftService_Bootstrap_Handler, }, { MethodName: "Join", Handler: _UserRaftService_Join_Handler, }, { MethodName: "GetConfiguration", Handler: _UserRaftService_GetConfiguration_Handler, }, { MethodName: "ApplyCommand", Handler: _UserRaftService_ApplyCommand_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Recover", Handler: _UserRaftService_Recover_Handler, ClientStreams: true, }, }, Metadata: "user_service.proto", }
UserRaftService_ServiceDesc is the grpc.ServiceDesc for UserRaftService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "userid.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateScheme", Handler: _UserService_UpdateScheme_Handler, }, { MethodName: "GetMetadata", Handler: _UserService_GetMetadata_Handler, }, { MethodName: "Lookup", Handler: _UserService_Lookup_Handler, }, { MethodName: "Get", Handler: _UserService_Get_Handler, }, { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Delete", Handler: _UserService_Delete_Handler, }, { MethodName: "Update", Handler: _UserService_Update_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Search", Handler: _UserService_Search_Handler, ServerStreams: true, }, { StreamName: "Scan", Handler: _UserService_Scan_Handler, ServerStreams: true, }, }, Metadata: "user_service.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserRaftServiceHandler ¶
func RegisterUserRaftServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserRaftServiceHandler registers the http handlers for service UserRaftService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserRaftServiceHandlerClient ¶
func RegisterUserRaftServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserRaftServiceClient) error
RegisterUserRaftServiceHandlerClient registers the http handlers for service UserRaftService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserRaftServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserRaftServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserRaftServiceClient" to call the correct interceptors.
func RegisterUserRaftServiceHandlerFromEndpoint ¶
func RegisterUserRaftServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserRaftServiceHandlerFromEndpoint is same as RegisterUserRaftServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserRaftServiceHandlerServer ¶
func RegisterUserRaftServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserRaftServiceServer) error
RegisterUserRaftServiceHandlerServer registers the http handlers for service UserRaftService to "mux". UnaryRPC :call UserRaftServiceServer 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 RegisterUserRaftServiceHandlerFromEndpoint instead.
func RegisterUserRaftServiceServer ¶
func RegisterUserRaftServiceServer(s grpc.ServiceRegistrar, srv UserRaftServiceServer)
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerClient ¶
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors.
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceHandlerServer ¶
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer 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 RegisterUserServiceHandlerFromEndpoint instead.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type Attribute ¶
type Attribute struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
DefaultTtl int32 `protobuf:"varint,2,opt,name=default_ttl,json=defaultTtl,proto3" json:"default_ttl,omitempty"`
Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"`
Indexed bool `protobuf:"varint,4,opt,name=indexed,proto3" json:"indexed,omitempty"`
Pii bool `protobuf:"varint,5,opt,name=pii,proto3" json:"pii,omitempty"`
// contains filtered or unexported fields
}
func (*Attribute) Descriptor
deprecated
func (*Attribute) GetDefaultTtl ¶
func (*Attribute) GetIndexed ¶
func (*Attribute) ProtoMessage ¶
func (*Attribute) ProtoMessage()
func (*Attribute) ProtoReflect ¶
func (x *Attribute) ProtoReflect() protoreflect.Message
type AttributeEntry ¶
type AttributeEntry struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Ttl int32 `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
// contains filtered or unexported fields
}
func (*AttributeEntry) Descriptor
deprecated
func (*AttributeEntry) Descriptor() ([]byte, []int)
Deprecated: Use AttributeEntry.ProtoReflect.Descriptor instead.
func (*AttributeEntry) GetName ¶
func (x *AttributeEntry) GetName() string
func (*AttributeEntry) GetTtl ¶
func (x *AttributeEntry) GetTtl() int32
func (*AttributeEntry) GetValue ¶
func (x *AttributeEntry) GetValue() string
func (*AttributeEntry) ProtoMessage ¶
func (*AttributeEntry) ProtoMessage()
func (*AttributeEntry) ProtoReflect ¶
func (x *AttributeEntry) ProtoReflect() protoreflect.Message
func (*AttributeEntry) Reset ¶
func (x *AttributeEntry) Reset()
func (*AttributeEntry) String ¶
func (x *AttributeEntry) String() string
type Command ¶
type Command struct {
Operation CommandOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=userid.CommandOperation" json:"operation,omitempty"`
SchemeReq *SchemeRequest `protobuf:"bytes,2,opt,name=scheme_req,json=schemeReq,proto3" json:"scheme_req,omitempty"`
CreateReq *CreateRequest `protobuf:"bytes,3,opt,name=create_req,json=createReq,proto3" json:"create_req,omitempty"`
UpdateReq *UpdateRequest `protobuf:"bytes,4,opt,name=update_req,json=updateReq,proto3" json:"update_req,omitempty"`
DeleteReq *DeleteRequest `protobuf:"bytes,5,opt,name=delete_req,json=deleteReq,proto3" json:"delete_req,omitempty"`
// contains filtered or unexported fields
}
func (*Command) Descriptor
deprecated
func (*Command) GetCreateReq ¶
func (x *Command) GetCreateReq() *CreateRequest
func (*Command) GetDeleteReq ¶
func (x *Command) GetDeleteReq() *DeleteRequest
func (*Command) GetOperation ¶
func (x *Command) GetOperation() CommandOperation
func (*Command) GetSchemeReq ¶
func (x *Command) GetSchemeReq() *SchemeRequest
func (*Command) GetUpdateReq ¶
func (x *Command) GetUpdateReq() *UpdateRequest
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type CommandOperation ¶
type CommandOperation int32
const ( CommandOperation_UNKNOWN_OP CommandOperation = 0 CommandOperation_SCHEME_OP CommandOperation = 1 CommandOperation_CREATE_OP CommandOperation = 2 CommandOperation_UPDATE_OP CommandOperation = 3 CommandOperation_DELETE_OP CommandOperation = 4 )
func (CommandOperation) Descriptor ¶
func (CommandOperation) Descriptor() protoreflect.EnumDescriptor
func (CommandOperation) Enum ¶
func (x CommandOperation) Enum() *CommandOperation
func (CommandOperation) EnumDescriptor
deprecated
func (CommandOperation) EnumDescriptor() ([]byte, []int)
Deprecated: Use CommandOperation.Descriptor instead.
func (CommandOperation) Number ¶
func (x CommandOperation) Number() protoreflect.EnumNumber
func (CommandOperation) String ¶
func (x CommandOperation) String() string
func (CommandOperation) Type ¶
func (CommandOperation) Type() protoreflect.EnumType
type Content ¶
type Content struct {
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*Content) Descriptor
deprecated
func (*Content) GetContent ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) ProtoReflect ¶
func (x *Content) ProtoReflect() protoreflect.Message
type CreateRequest ¶
type CreateRequest struct {
Attributes []*AttributeEntry `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
// contains filtered or unexported fields
}
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetAttributes ¶
func (x *CreateRequest) GetAttributes() []*AttributeEntry
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type DeleteRequest ¶
type DeleteRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetUserId ¶
func (x *DeleteRequest) GetUserId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type GetRequest ¶
type GetRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetUserId ¶
func (x *GetRequest) GetUserId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type LookupRequest ¶
type LookupRequest struct {
LookupType LookupType `protobuf:"varint,1,opt,name=lookup_type,json=lookupType,proto3,enum=userid.LookupType" json:"lookup_type,omitempty"`
Attribute string `protobuf:"bytes,2,opt,name=attribute,proto3" json:"attribute,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
SelectAttributes []string `protobuf:"bytes,4,rep,name=select_attributes,json=selectAttributes,proto3" json:"select_attributes,omitempty"`
// contains filtered or unexported fields
}
func (*LookupRequest) Descriptor
deprecated
func (*LookupRequest) Descriptor() ([]byte, []int)
Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.
func (*LookupRequest) GetAttribute ¶
func (x *LookupRequest) GetAttribute() string
func (*LookupRequest) GetKey ¶
func (x *LookupRequest) GetKey() string
func (*LookupRequest) GetLookupType ¶
func (x *LookupRequest) GetLookupType() LookupType
func (*LookupRequest) GetSelectAttributes ¶
func (x *LookupRequest) GetSelectAttributes() []string
func (*LookupRequest) ProtoMessage ¶
func (*LookupRequest) ProtoMessage()
func (*LookupRequest) ProtoReflect ¶
func (x *LookupRequest) ProtoReflect() protoreflect.Message
func (*LookupRequest) Reset ¶
func (x *LookupRequest) Reset()
func (*LookupRequest) String ¶
func (x *LookupRequest) String() string
type LookupType ¶
type LookupType int32
const ( LookupType_UNKNOWN_LOOKUP LookupType = 0 LookupType_BY_USER LookupType = 1 LookupType_BY_ATTRIBUTE LookupType = 2 // lookup only can happen on indexed unique attributes )
func (LookupType) Descriptor ¶
func (LookupType) Descriptor() protoreflect.EnumDescriptor
func (LookupType) Enum ¶
func (x LookupType) Enum() *LookupType
func (LookupType) EnumDescriptor
deprecated
func (LookupType) EnumDescriptor() ([]byte, []int)
Deprecated: Use LookupType.Descriptor instead.
func (LookupType) Number ¶
func (x LookupType) Number() protoreflect.EnumNumber
func (LookupType) String ¶
func (x LookupType) String() string
func (LookupType) Type ¶
func (LookupType) Type() protoreflect.EnumType
type Metadata ¶
type Metadata struct {
Attributes []*Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
// contains filtered or unexported fields
}
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetAttributes ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type RaftConfiguration ¶
type RaftConfiguration struct {
State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
LastIndex uint64 `protobuf:"varint,2,opt,name=last_index,json=lastIndex,proto3" json:"last_index,omitempty"`
ServerList []*RaftServer `protobuf:"bytes,3,rep,name=server_list,json=serverList,proto3" json:"server_list,omitempty"`
// contains filtered or unexported fields
}
func (*RaftConfiguration) Descriptor
deprecated
func (*RaftConfiguration) Descriptor() ([]byte, []int)
Deprecated: Use RaftConfiguration.ProtoReflect.Descriptor instead.
func (*RaftConfiguration) GetLastIndex ¶
func (x *RaftConfiguration) GetLastIndex() uint64
func (*RaftConfiguration) GetServerList ¶
func (x *RaftConfiguration) GetServerList() []*RaftServer
func (*RaftConfiguration) GetState ¶
func (x *RaftConfiguration) GetState() string
func (*RaftConfiguration) ProtoMessage ¶
func (*RaftConfiguration) ProtoMessage()
func (*RaftConfiguration) ProtoReflect ¶
func (x *RaftConfiguration) ProtoReflect() protoreflect.Message
func (*RaftConfiguration) Reset ¶
func (x *RaftConfiguration) Reset()
func (*RaftConfiguration) String ¶
func (x *RaftConfiguration) String() string
type RaftNode ¶
type RaftNode struct {
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
NodeAddr string `protobuf:"bytes,2,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
// contains filtered or unexported fields
}
func (*RaftNode) Descriptor
deprecated
func (*RaftNode) GetNodeAddr ¶
func (*RaftNode) ProtoMessage ¶
func (*RaftNode) ProtoMessage()
func (*RaftNode) ProtoReflect ¶
func (x *RaftNode) ProtoReflect() protoreflect.Message
type RaftServer ¶
type RaftServer struct {
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
RaftAddr string `protobuf:"bytes,2,opt,name=raft_addr,json=raftAddr,proto3" json:"raft_addr,omitempty"`
Suffrage string `protobuf:"bytes,3,opt,name=suffrage,proto3" json:"suffrage,omitempty"`
GrpcAddr string `protobuf:"bytes,4,opt,name=grpc_addr,json=grpcAddr,proto3" json:"grpc_addr,omitempty"`
// contains filtered or unexported fields
}
func (*RaftServer) Descriptor
deprecated
func (*RaftServer) Descriptor() ([]byte, []int)
Deprecated: Use RaftServer.ProtoReflect.Descriptor instead.
func (*RaftServer) GetGrpcAddr ¶
func (x *RaftServer) GetGrpcAddr() string
func (*RaftServer) GetNodeId ¶
func (x *RaftServer) GetNodeId() string
func (*RaftServer) GetRaftAddr ¶
func (x *RaftServer) GetRaftAddr() string
func (*RaftServer) GetSuffrage ¶
func (x *RaftServer) GetSuffrage() string
func (*RaftServer) ProtoMessage ¶
func (*RaftServer) ProtoMessage()
func (*RaftServer) ProtoReflect ¶
func (x *RaftServer) ProtoReflect() protoreflect.Message
func (*RaftServer) Reset ¶
func (x *RaftServer) Reset()
func (*RaftServer) String ¶
func (x *RaftServer) String() string
type ScanRequest ¶
type ScanRequest struct {
Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
Seek string `protobuf:"bytes,2,opt,name=seek,proto3" json:"seek,omitempty"`
Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
SelectAttributes []string `protobuf:"bytes,4,rep,name=select_attributes,json=selectAttributes,proto3" json:"select_attributes,omitempty"`
// contains filtered or unexported fields
}
func (*ScanRequest) Descriptor
deprecated
func (*ScanRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.
func (*ScanRequest) GetLimit ¶
func (x *ScanRequest) GetLimit() int32
func (*ScanRequest) GetPrefix ¶
func (x *ScanRequest) GetPrefix() string
func (*ScanRequest) GetSeek ¶
func (x *ScanRequest) GetSeek() string
func (*ScanRequest) GetSelectAttributes ¶
func (x *ScanRequest) GetSelectAttributes() []string
func (*ScanRequest) ProtoMessage ¶
func (*ScanRequest) ProtoMessage()
func (*ScanRequest) ProtoReflect ¶
func (x *ScanRequest) ProtoReflect() protoreflect.Message
func (*ScanRequest) Reset ¶
func (x *ScanRequest) Reset()
func (*ScanRequest) String ¶
func (x *ScanRequest) String() string
type SchemeRequest ¶
type SchemeRequest struct {
Attributes []*Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
// contains filtered or unexported fields
}
func (*SchemeRequest) Descriptor
deprecated
func (*SchemeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SchemeRequest.ProtoReflect.Descriptor instead.
func (*SchemeRequest) GetAttributes ¶
func (x *SchemeRequest) GetAttributes() []*Attribute
func (*SchemeRequest) ProtoMessage ¶
func (*SchemeRequest) ProtoMessage()
func (*SchemeRequest) ProtoReflect ¶
func (x *SchemeRequest) ProtoReflect() protoreflect.Message
func (*SchemeRequest) Reset ¶
func (x *SchemeRequest) Reset()
func (*SchemeRequest) String ¶
func (x *SchemeRequest) String() string
type SearchRequest ¶
type SearchRequest struct {
Attribute string `protobuf:"bytes,2,opt,name=attribute,proto3" json:"attribute,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetAttribute ¶
func (x *SearchRequest) GetAttribute() string
func (*SearchRequest) GetKey ¶
func (x *SearchRequest) GetKey() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type Status ¶
type Status struct {
Updated bool `protobuf:"varint,1,opt,name=updated,proto3" json:"updated,omitempty"`
Elapsed float64 `protobuf:"fixed64,2,opt,name=elapsed,proto3" json:"elapsed,omitempty"` // operation cost in seconds
// contains filtered or unexported fields
}
func (*Status) Descriptor
deprecated
func (*Status) GetElapsed ¶
func (*Status) GetUpdated ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type UnimplementedUserRaftServiceServer ¶
type UnimplementedUserRaftServiceServer struct {
}
UnimplementedUserRaftServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserRaftServiceServer) ApplyCommand ¶
func (UnimplementedUserRaftServiceServer) GetConfiguration ¶
func (UnimplementedUserRaftServiceServer) GetConfiguration(context.Context, *emptypb.Empty) (*RaftConfiguration, error)
func (UnimplementedUserRaftServiceServer) Recover ¶
func (UnimplementedUserRaftServiceServer) Recover(UserRaftService_RecoverServer) error
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct {
}
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *CreateRequest) (*UserEntry, error)
func (UnimplementedUserServiceServer) Delete ¶
func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) Get ¶
func (UnimplementedUserServiceServer) Get(context.Context, *GetRequest) (*UserEntry, error)
func (UnimplementedUserServiceServer) GetMetadata ¶
func (UnimplementedUserServiceServer) Lookup ¶
func (UnimplementedUserServiceServer) Lookup(context.Context, *LookupRequest) (*UserEntry, error)
func (UnimplementedUserServiceServer) Scan ¶
func (UnimplementedUserServiceServer) Scan(*ScanRequest, UserService_ScanServer) error
func (UnimplementedUserServiceServer) Search ¶
func (UnimplementedUserServiceServer) Search(*SearchRequest, UserService_SearchServer) error
func (UnimplementedUserServiceServer) Update ¶
func (UnimplementedUserServiceServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) UpdateScheme ¶
func (UnimplementedUserServiceServer) UpdateScheme(context.Context, *SchemeRequest) (*emptypb.Empty, error)
type UnsafeUserRaftServiceServer ¶
type UnsafeUserRaftServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserRaftServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserRaftServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Attributes []*AttributeEntry `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
UpdateType UpdateType `protobuf:"varint,3,opt,name=update_type,json=updateType,proto3,enum=userid.UpdateType" json:"update_type,omitempty"`
Cas bool `protobuf:"varint,4,opt,name=cas,proto3" json:"cas,omitempty"`
CasVersion int64 `protobuf:"varint,5,opt,name=cas_version,json=casVersion,proto3" json:"cas_version,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetAttributes ¶
func (x *UpdateRequest) GetAttributes() []*AttributeEntry
func (*UpdateRequest) GetCas ¶
func (x *UpdateRequest) GetCas() bool
func (*UpdateRequest) GetCasVersion ¶
func (x *UpdateRequest) GetCasVersion() int64
func (*UpdateRequest) GetUpdateType ¶
func (x *UpdateRequest) GetUpdateType() UpdateType
func (*UpdateRequest) GetUserId ¶
func (x *UpdateRequest) GetUserId() string
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
type UpdateType ¶
type UpdateType int32
const ( UpdateType_UNKNOWN_TYPE UpdateType = 0 UpdateType_MERGE UpdateType = 1 UpdateType_REPLACE UpdateType = 2 )
func (UpdateType) Descriptor ¶
func (UpdateType) Descriptor() protoreflect.EnumDescriptor
func (UpdateType) Enum ¶
func (x UpdateType) Enum() *UpdateType
func (UpdateType) EnumDescriptor
deprecated
func (UpdateType) EnumDescriptor() ([]byte, []int)
Deprecated: Use UpdateType.Descriptor instead.
func (UpdateType) Number ¶
func (x UpdateType) Number() protoreflect.EnumNumber
func (UpdateType) String ¶
func (x UpdateType) String() string
func (UpdateType) Type ¶
func (UpdateType) Type() protoreflect.EnumType
type UserEntry ¶
type UserEntry struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
Attributes []*AttributeEntry `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
// contains filtered or unexported fields
}
func (*UserEntry) Descriptor
deprecated
func (*UserEntry) GetAttributes ¶
func (x *UserEntry) GetAttributes() []*AttributeEntry
func (*UserEntry) GetVersion ¶
func (*UserEntry) ProtoMessage ¶
func (*UserEntry) ProtoMessage()
func (*UserEntry) ProtoReflect ¶
func (x *UserEntry) ProtoReflect() protoreflect.Message
type UserRaftServiceClient ¶
type UserRaftServiceClient interface {
Bootstrap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
Join(ctx context.Context, in *RaftNode, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetConfiguration(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RaftConfiguration, error)
ApplyCommand(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Status, error)
Recover(ctx context.Context, opts ...grpc.CallOption) (UserRaftService_RecoverClient, error)
}
UserRaftServiceClient is the client API for UserRaftService 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 NewUserRaftServiceClient ¶
func NewUserRaftServiceClient(cc grpc.ClientConnInterface) UserRaftServiceClient
type UserRaftServiceServer ¶
type UserRaftServiceServer interface {
Bootstrap(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
Join(context.Context, *RaftNode) (*emptypb.Empty, error)
GetConfiguration(context.Context, *emptypb.Empty) (*RaftConfiguration, error)
ApplyCommand(context.Context, *Command) (*Status, error)
Recover(UserRaftService_RecoverServer) error
// contains filtered or unexported methods
}
UserRaftServiceServer is the server API for UserRaftService service. All implementations must embed UnimplementedUserRaftServiceServer for forward compatibility
type UserServiceClient ¶
type UserServiceClient interface {
//
// Adds or updates attributes in scheme
//
UpdateScheme(ctx context.Context, in *SchemeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
//
// Gets metadata about using attributes
//
GetMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Metadata, error)
//
// Quick user lookup request
//
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*UserEntry, error)
//
// Search users by indexed non-unique attributes
//
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (UserService_SearchClient, error)
//
// Get user with all attributes
//
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*UserEntry, error)
//
// Create user, returns new user_id
//
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*UserEntry, error)
//
// Delete user request (sets TTL to all PII data for particular user)
//
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
//
// Update user attributes
//
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
//
// Scan users
//
Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (UserService_ScanClient, error)
}
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
//
// Adds or updates attributes in scheme
//
UpdateScheme(context.Context, *SchemeRequest) (*emptypb.Empty, error)
//
// Gets metadata about using attributes
//
GetMetadata(context.Context, *emptypb.Empty) (*Metadata, error)
//
// Quick user lookup request
//
Lookup(context.Context, *LookupRequest) (*UserEntry, error)
//
// Search users by indexed non-unique attributes
//
Search(*SearchRequest, UserService_SearchServer) error
//
// Get user with all attributes
//
Get(context.Context, *GetRequest) (*UserEntry, error)
//
// Create user, returns new user_id
//
Create(context.Context, *CreateRequest) (*UserEntry, error)
//
// Delete user request (sets TTL to all PII data for particular user)
//
Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
//
// Update user attributes
//
Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
//
// Scan users
//
Scan(*ScanRequest, UserService_ScanServer) error
// contains filtered or unexported methods
}
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserService_ScanClient ¶
type UserService_ScanClient interface {
Recv() (*UserEntry, error)
grpc.ClientStream
}
type UserService_ScanServer ¶
type UserService_ScanServer interface {
Send(*UserEntry) error
grpc.ServerStream
}
type UserService_SearchClient ¶
type UserService_SearchClient interface {
Recv() (*UserEntry, error)
grpc.ClientStream
}
type UserService_SearchServer ¶
type UserService_SearchServer interface {
Send(*UserEntry) error
grpc.ServerStream
}