useridpb

package module
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

README

useridpb

User ID Service API Protobuf

Documentation

Overview

Package useridpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
var (
	CommandOperation_name = map[int32]string{
		0: "UNKNOWN_OP",
		1: "CREATE_OP",
		2: "UPDATE_OP",
		3: "DELETE_OP",
		4: "ADD_RANGE_OP",
	}
	CommandOperation_value = map[string]int32{
		"UNKNOWN_OP":   0,
		"CREATE_OP":    1,
		"UPDATE_OP":    2,
		"DELETE_OP":    3,
		"ADD_RANGE_OP": 4,
	}
)

Enum value maps for CommandOperation.

View Source
var File_user_service_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "userid.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCounts",
			Handler:    _UserService_GetCounts_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,
		},
		{
			MethodName: "AddRange",
			Handler:    _UserService_AddRange_Handler,
		},
		{
			MethodName: "GetCapacity",
			Handler:    _UserService_GetCapacity_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 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 AttributeCount added in v1.0.12

type AttributeCount struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Count int64  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*AttributeCount) Descriptor deprecated added in v1.0.12

func (*AttributeCount) Descriptor() ([]byte, []int)

Deprecated: Use AttributeCount.ProtoReflect.Descriptor instead.

func (*AttributeCount) GetCount added in v1.0.12

func (x *AttributeCount) GetCount() int64

func (*AttributeCount) GetName added in v1.0.12

func (x *AttributeCount) GetName() string

func (*AttributeCount) ProtoMessage added in v1.0.12

func (*AttributeCount) ProtoMessage()

func (*AttributeCount) ProtoReflect added in v1.0.12

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

func (*AttributeCount) Reset added in v1.0.12

func (x *AttributeCount) Reset()

func (*AttributeCount) String added in v1.0.12

func (x *AttributeCount) String() string

type AttributeEntity added in v1.0.8

type AttributeEntity 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"`
	// contains filtered or unexported fields
}

func (*AttributeEntity) Descriptor deprecated added in v1.0.8

func (*AttributeEntity) Descriptor() ([]byte, []int)

Deprecated: Use AttributeEntity.ProtoReflect.Descriptor instead.

func (*AttributeEntity) GetName added in v1.0.8

func (x *AttributeEntity) GetName() string

func (*AttributeEntity) GetValue added in v1.0.8

func (x *AttributeEntity) GetValue() string

func (*AttributeEntity) ProtoMessage added in v1.0.8

func (*AttributeEntity) ProtoMessage()

func (*AttributeEntity) ProtoReflect added in v1.0.8

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

func (*AttributeEntity) Reset added in v1.0.8

func (x *AttributeEntity) Reset()

func (*AttributeEntity) String added in v1.0.8

func (x *AttributeEntity) String() string

type Capacity added in v1.0.5

type Capacity struct {
	PendingIds int64 `protobuf:"varint,1,opt,name=pending_ids,json=pendingIds,proto3" json:"pending_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*Capacity) Descriptor deprecated added in v1.0.5

func (*Capacity) Descriptor() ([]byte, []int)

Deprecated: Use Capacity.ProtoReflect.Descriptor instead.

func (*Capacity) GetPendingIds added in v1.0.5

func (x *Capacity) GetPendingIds() int64

func (*Capacity) ProtoMessage added in v1.0.5

func (*Capacity) ProtoMessage()

func (*Capacity) ProtoReflect added in v1.0.5

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

func (*Capacity) Reset added in v1.0.5

func (x *Capacity) Reset()

func (*Capacity) String added in v1.0.5

func (x *Capacity) String() string

type Command

type Command struct {
	Operation CommandOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=userid.CommandOperation" json:"operation,omitempty"`
	CreateReq *CreateRequest   `protobuf:"bytes,2,opt,name=create_req,json=createReq,proto3" json:"create_req,omitempty"`
	UpdateReq *UpdateRequest   `protobuf:"bytes,3,opt,name=update_req,json=updateReq,proto3" json:"update_req,omitempty"`
	DeleteReq *DeleteRequest   `protobuf:"bytes,4,opt,name=delete_req,json=deleteReq,proto3" json:"delete_req,omitempty"`
	Range     *Range           `protobuf:"bytes,5,opt,name=range,proto3" json:"range,omitempty"`
	// contains filtered or unexported fields
}

func (*Command) Descriptor deprecated

func (*Command) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

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) GetRange added in v1.0.4

func (x *Command) GetRange() *Range

func (*Command) GetUpdateReq

func (x *Command) GetUpdateReq() *UpdateRequest

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type CommandOperation

type CommandOperation int32
const (
	CommandOperation_UNKNOWN_OP   CommandOperation = 0
	CommandOperation_CREATE_OP    CommandOperation = 1
	CommandOperation_UPDATE_OP    CommandOperation = 2
	CommandOperation_DELETE_OP    CommandOperation = 3
	CommandOperation_ADD_RANGE_OP CommandOperation = 4
)

func (CommandOperation) Descriptor

func (CommandOperation) Enum

func (CommandOperation) EnumDescriptor deprecated

func (CommandOperation) EnumDescriptor() ([]byte, []int)

Deprecated: Use CommandOperation.Descriptor instead.

func (CommandOperation) Number

func (CommandOperation) String

func (x CommandOperation) String() string

func (CommandOperation) Type

type Counts added in v1.0.9

type Counts struct {
	Attributes []*AttributeCount `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*Counts) Descriptor deprecated added in v1.0.9

func (*Counts) Descriptor() ([]byte, []int)

Deprecated: Use Counts.ProtoReflect.Descriptor instead.

func (*Counts) GetAttributes added in v1.0.9

func (x *Counts) GetAttributes() []*AttributeCount

func (*Counts) ProtoMessage added in v1.0.9

func (*Counts) ProtoMessage()

func (*Counts) ProtoReflect added in v1.0.9

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

func (*Counts) Reset added in v1.0.9

func (x *Counts) Reset()

func (*Counts) String added in v1.0.9

func (x *Counts) String() string

type CreateRequest

type CreateRequest struct {
	Attributes []*AttributeEntity `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
	Files      []*FileEntity      `protobuf:"bytes,2,rep,name=files,proto3" json:"files,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() []*AttributeEntity

func (*CreateRequest) GetFiles added in v1.0.4

func (x *CreateRequest) GetFiles() []*FileEntity

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 CreateResponse added in v1.0.4

type CreateResponse struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated added in v1.0.4

func (*CreateResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetUserId added in v1.0.4

func (x *CreateResponse) GetUserId() string

func (*CreateResponse) ProtoMessage added in v1.0.4

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect added in v1.0.4

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

func (*CreateResponse) Reset added in v1.0.4

func (x *CreateResponse) Reset()

func (*CreateResponse) String added in v1.0.4

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	UserId         string   `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	KeepAttributes []string `protobuf:"bytes,2,rep,name=keep_attributes,json=keepAttributes,proto3" json:"keep_attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

func (*DeleteRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetKeepAttributes added in v1.0.12

func (x *DeleteRequest) GetKeepAttributes() []string

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 FileEntity added in v1.0.8

type FileEntity struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Data      []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Size      int32  `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	CreatedAt int64  `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*FileEntity) Descriptor deprecated added in v1.0.8

func (*FileEntity) Descriptor() ([]byte, []int)

Deprecated: Use FileEntity.ProtoReflect.Descriptor instead.

func (*FileEntity) GetCreatedAt added in v1.0.8

func (x *FileEntity) GetCreatedAt() int64

func (*FileEntity) GetData added in v1.0.8

func (x *FileEntity) GetData() []byte

func (*FileEntity) GetName added in v1.0.8

func (x *FileEntity) GetName() string

func (*FileEntity) GetSize added in v1.0.8

func (x *FileEntity) GetSize() int32

func (*FileEntity) ProtoMessage added in v1.0.8

func (*FileEntity) ProtoMessage()

func (*FileEntity) ProtoReflect added in v1.0.8

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

func (*FileEntity) Reset added in v1.0.8

func (x *FileEntity) Reset()

func (*FileEntity) String added in v1.0.8

func (x *FileEntity) String() string

type GetRequest

type GetRequest struct {
	UserId       string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	FileContents bool   `protobuf:"varint,4,opt,name=file_contents,json=fileContents,proto3" json:"file_contents,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetFileContents added in v1.0.6

func (x *GetRequest) GetFileContents() bool

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"`
	FileContents bool       `protobuf:"varint,4,opt,name=file_contents,json=fileContents,proto3" json:"file_contents,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) GetFileContents added in v1.0.6

func (x *LookupRequest) GetFileContents() bool

func (*LookupRequest) GetKey

func (x *LookupRequest) GetKey() string

func (*LookupRequest) GetLookupType

func (x *LookupRequest) GetLookupType() LookupType

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

type Range added in v1.0.4

type Range struct {
	StartId int64 `protobuf:"varint,1,opt,name=start_id,json=startId,proto3" json:"start_id,omitempty"`
	EndId   int64 `protobuf:"varint,2,opt,name=end_id,json=endId,proto3" json:"end_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Range) Descriptor deprecated added in v1.0.4

func (*Range) Descriptor() ([]byte, []int)

Deprecated: Use Range.ProtoReflect.Descriptor instead.

func (*Range) GetEndId added in v1.0.4

func (x *Range) GetEndId() int64

func (*Range) GetStartId added in v1.0.4

func (x *Range) GetStartId() int64

func (*Range) ProtoMessage added in v1.0.4

func (*Range) ProtoMessage()

func (*Range) ProtoReflect added in v1.0.4

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

func (*Range) Reset added in v1.0.4

func (x *Range) Reset()

func (*Range) String added in v1.0.4

func (x *Range) String() string

type RangeEntity added in v1.0.8

type RangeEntity struct {
	Ranges []*Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
	// contains filtered or unexported fields
}

located in range

func (*RangeEntity) Descriptor deprecated added in v1.0.8

func (*RangeEntity) Descriptor() ([]byte, []int)

Deprecated: Use RangeEntity.ProtoReflect.Descriptor instead.

func (*RangeEntity) GetRanges added in v1.0.8

func (x *RangeEntity) GetRanges() []*Range

func (*RangeEntity) ProtoMessage added in v1.0.8

func (*RangeEntity) ProtoMessage()

func (*RangeEntity) ProtoReflect added in v1.0.8

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

func (*RangeEntity) Reset added in v1.0.8

func (x *RangeEntity) Reset()

func (*RangeEntity) String added in v1.0.8

func (x *RangeEntity) String() string

type ScanRequest

type ScanRequest struct {
	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Offset int32  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit  int32  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,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) GetOffset added in v1.0.4

func (x *ScanRequest) GetOffset() int32

func (*ScanRequest) GetPrefix

func (x *ScanRequest) GetPrefix() 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 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 UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) AddRange added in v1.0.4

func (UnimplementedUserServiceServer) Create

func (UnimplementedUserServiceServer) Delete

func (UnimplementedUserServiceServer) Get

func (UnimplementedUserServiceServer) GetCapacity added in v1.0.4

func (UnimplementedUserServiceServer) GetCounts added in v1.0.9

func (UnimplementedUserServiceServer) Lookup

func (UnimplementedUserServiceServer) Scan

func (UnimplementedUserServiceServer) Search

func (UnimplementedUserServiceServer) Update

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 []*AttributeEntity `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
	Files      []*FileEntity      `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
	UpdateType UpdateType         `protobuf:"varint,4,opt,name=update_type,json=updateType,proto3,enum=userid.UpdateType" json:"update_type,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() []*AttributeEntity

func (*UpdateRequest) GetFiles added in v1.0.4

func (x *UpdateRequest) GetFiles() []*FileEntity

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

type UserEntity added in v1.0.8

type UserEntity 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 []*AttributeEntity `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
	Files      []*FileEntity      `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"`
	CreatedAt  int64              `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	DeletedAt  int64              `protobuf:"varint,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

located in users:id

func (*UserEntity) Descriptor deprecated added in v1.0.8

func (*UserEntity) Descriptor() ([]byte, []int)

Deprecated: Use UserEntity.ProtoReflect.Descriptor instead.

func (*UserEntity) GetAttributes added in v1.0.8

func (x *UserEntity) GetAttributes() []*AttributeEntity

func (*UserEntity) GetCreatedAt added in v1.0.10

func (x *UserEntity) GetCreatedAt() int64

func (*UserEntity) GetDeletedAt added in v1.0.8

func (x *UserEntity) GetDeletedAt() int64

func (*UserEntity) GetFiles added in v1.0.8

func (x *UserEntity) GetFiles() []*FileEntity

func (*UserEntity) GetUserId added in v1.0.8

func (x *UserEntity) GetUserId() string

func (*UserEntity) GetVersion added in v1.0.8

func (x *UserEntity) GetVersion() int64

func (*UserEntity) ProtoMessage added in v1.0.8

func (*UserEntity) ProtoMessage()

func (*UserEntity) ProtoReflect added in v1.0.8

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

func (*UserEntity) Reset added in v1.0.8

func (x *UserEntity) Reset()

func (*UserEntity) String added in v1.0.8

func (x *UserEntity) String() string

type UserServiceClient

type UserServiceClient interface {
	//
	// Gets attributes counts
	//
	GetCounts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Counts, error)
	//
	// Quick user lookup request
	//
	Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*UserEntity, 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) (*UserEntity, error)
	//
	// Create user with new user_id
	//
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, 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)
	//
	// Allocate user id range
	//
	AddRange(ctx context.Context, in *Range, opts ...grpc.CallOption) (*emptypb.Empty, error)
	//
	// Gets user id ranges and etc
	//
	GetCapacity(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Capacity, 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.

type UserServiceServer

type UserServiceServer interface {
	//
	// Gets attributes counts
	//
	GetCounts(context.Context, *emptypb.Empty) (*Counts, error)
	//
	// Quick user lookup request
	//
	Lookup(context.Context, *LookupRequest) (*UserEntity, error)
	//
	// Search users by indexed non-unique attributes
	//
	Search(*SearchRequest, UserService_SearchServer) error
	//
	// Get user with all attributes
	//
	Get(context.Context, *GetRequest) (*UserEntity, error)
	//
	// Create user with new user_id
	//
	Create(context.Context, *CreateRequest) (*CreateResponse, 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
	//
	// Allocate user id range
	//
	AddRange(context.Context, *Range) (*emptypb.Empty, error)
	//
	// Gets user id ranges and etc
	//
	GetCapacity(context.Context, *emptypb.Empty) (*Capacity, 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() (*UserEntity, error)
	grpc.ClientStream
}

type UserService_ScanServer

type UserService_ScanServer interface {
	Send(*UserEntity) error
	grpc.ServerStream
}

type UserService_SearchClient

type UserService_SearchClient interface {
	Recv() (*UserEntity, error)
	grpc.ClientStream
}

type UserService_SearchServer

type UserService_SearchServer interface {
	Send(*UserEntity) error
	grpc.ServerStream
}

Directories

Path Synopsis
third_party

Jump to

Keyboard shortcuts

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