useridpb

package module
v1.0.4 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: "SCHEME_OP",
		2: "CREATE_OP",
		3: "UPDATE_OP",
		4: "DELETE_OP",
		5: "ADD_RANGE_OP",
	}
	CommandOperation_value = map[string]int32{
		"UNKNOWN_OP":   0,
		"SCHEME_OP":    1,
		"CREATE_OP":    2,
		"UPDATE_OP":    3,
		"DELETE_OP":    4,
		"ADD_RANGE_OP": 5,
	}
)

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: "UpdateScheme",
			Handler:    _UserService_UpdateScheme_Handler,
		},
		{
			MethodName: "GetMetadata",
			Handler:    _UserService_GetMetadata_Handler,
		},
		{
			MethodName: "Lookup",
			Handler:    _UserService_Lookup_Handler,
		},
		{
			MethodName: "Head",
			Handler:    _UserService_Head_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 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) Descriptor() ([]byte, []int)

Deprecated: Use Attribute.ProtoReflect.Descriptor instead.

func (*Attribute) GetDefaultTtl

func (x *Attribute) GetDefaultTtl() int32

func (*Attribute) GetIndexed

func (x *Attribute) GetIndexed() bool

func (*Attribute) GetName

func (x *Attribute) GetName() string

func (*Attribute) GetPii

func (x *Attribute) GetPii() bool

func (*Attribute) GetUnique

func (x *Attribute) GetUnique() bool

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) ProtoReflect

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

func (*Attribute) Reset

func (x *Attribute) Reset()

func (*Attribute) String

func (x *Attribute) String() string

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

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

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

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

Deprecated: Use CapacityResponse.ProtoReflect.Descriptor instead.

func (*CapacityResponse) GetPendingIds added in v1.0.4

func (x *CapacityResponse) GetPendingIds() int64

func (*CapacityResponse) ProtoMessage added in v1.0.4

func (*CapacityResponse) ProtoMessage()

func (*CapacityResponse) ProtoReflect added in v1.0.4

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

func (*CapacityResponse) Reset added in v1.0.4

func (x *CapacityResponse) Reset()

func (*CapacityResponse) String added in v1.0.4

func (x *CapacityResponse) 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"`
	Range     *Range           `protobuf:"bytes,6,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) 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

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_SCHEME_OP    CommandOperation = 1
	CommandOperation_CREATE_OP    CommandOperation = 2
	CommandOperation_UPDATE_OP    CommandOperation = 3
	CommandOperation_DELETE_OP    CommandOperation = 4
	CommandOperation_ADD_RANGE_OP CommandOperation = 5
)

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 CreateRequest

type CreateRequest 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"`
	Files      []*FileEntry      `protobuf:"bytes,3,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() []*AttributeEntry

func (*CreateRequest) GetFiles added in v1.0.4

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

func (*CreateRequest) GetUserId added in v1.0.4

func (x *CreateRequest) GetUserId() string

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"`
	// 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 FileEntry added in v1.0.4

type FileEntry 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"`
	Ttl       int32  `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"`
	CreatedAt int32  `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

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

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

Deprecated: Use FileEntry.ProtoReflect.Descriptor instead.

func (*FileEntry) GetCreatedAt added in v1.0.4

func (x *FileEntry) GetCreatedAt() int32

func (*FileEntry) GetData added in v1.0.4

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

func (*FileEntry) GetName added in v1.0.4

func (x *FileEntry) GetName() string

func (*FileEntry) GetSize added in v1.0.4

func (x *FileEntry) GetSize() int32

func (*FileEntry) GetTtl added in v1.0.4

func (x *FileEntry) GetTtl() int32

func (*FileEntry) ProtoMessage added in v1.0.4

func (*FileEntry) ProtoMessage()

func (*FileEntry) ProtoReflect added in v1.0.4

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

func (*FileEntry) Reset added in v1.0.4

func (x *FileEntry) Reset()

func (*FileEntry) String added in v1.0.4

func (x *FileEntry) String() string

type GetRequest

type GetRequest struct {
	UserId           string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	SelectAttributes string `protobuf:"bytes,4,opt,name=select_attributes,json=selectAttributes,proto3" json:"select_attributes,omitempty"` // ”, '*', comma separated list
	SelectFiles      string `protobuf:"bytes,5,opt,name=select_files,json=selectFiles,proto3" json:"select_files,omitempty"`                // ”, '*', comma separated list
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetSelectAttributes added in v1.0.4

func (x *GetRequest) GetSelectAttributes() string

func (*GetRequest) GetSelectFiles added in v1.0.4

func (x *GetRequest) GetSelectFiles() string

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

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

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

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

Deprecated: Use HeadRequest.ProtoReflect.Descriptor instead.

func (*HeadRequest) GetUserId added in v1.0.4

func (x *HeadRequest) GetUserId() string

func (*HeadRequest) ProtoMessage added in v1.0.4

func (*HeadRequest) ProtoMessage()

func (*HeadRequest) ProtoReflect added in v1.0.4

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

func (*HeadRequest) Reset added in v1.0.4

func (x *HeadRequest) Reset()

func (*HeadRequest) String added in v1.0.4

func (x *HeadRequest) 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,opt,name=select_attributes,json=selectAttributes,proto3" json:"select_attributes,omitempty"` // ”, '*', comma separated list
	SelectFiles      string     `protobuf:"bytes,5,opt,name=select_files,json=selectFiles,proto3" json:"select_files,omitempty"`                // ”, '*', comma separated list
	// 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) GetSelectFiles added in v1.0.4

func (x *LookupRequest) GetSelectFiles() 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

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetAttributes

func (x *Metadata) GetAttributes() []*Attribute

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

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 ScanRequest

type ScanRequest struct {
	Prefix           string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Offset           string `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit            int32  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	SelectAttributes string `protobuf:"bytes,4,opt,name=select_attributes,json=selectAttributes,proto3" json:"select_attributes,omitempty"` // ”, '*', comma separated list
	SelectFiles      string `protobuf:"bytes,5,opt,name=select_files,json=selectFiles,proto3" json:"select_files,omitempty"`                // ”, '*', comma separated list
	// 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() string

func (*ScanRequest) GetPrefix

func (x *ScanRequest) GetPrefix() string

func (*ScanRequest) GetSelectAttributes

func (x *ScanRequest) GetSelectAttributes() string

func (*ScanRequest) GetSelectFiles added in v1.0.4

func (x *ScanRequest) GetSelectFiles() 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 {
	UpdateAttributes []*Attribute `protobuf:"bytes,1,rep,name=update_attributes,json=updateAttributes,proto3" json:"update_attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*SchemeRequest) Descriptor deprecated

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

Deprecated: Use SchemeRequest.ProtoReflect.Descriptor instead.

func (*SchemeRequest) GetUpdateAttributes added in v1.0.4

func (x *SchemeRequest) GetUpdateAttributes() []*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 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) GetMetadata

func (UnimplementedUserServiceServer) Head added in v1.0.4

func (UnimplementedUserServiceServer) Lookup

func (UnimplementedUserServiceServer) Scan

func (UnimplementedUserServiceServer) Search

func (UnimplementedUserServiceServer) Update

func (UnimplementedUserServiceServer) UpdateScheme

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"`
	Files      []*FileEntry      `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"`
	Cas        bool              `protobuf:"varint,5,opt,name=cas,proto3" json:"cas,omitempty"`
	CasVersion int64             `protobuf:"varint,6,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) GetFiles added in v1.0.4

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

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 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"`
	Files      []*FileEntry      `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"`
	DeletedAt  int64             `protobuf:"varint,5,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UserEntry) Descriptor deprecated

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

Deprecated: Use UserEntry.ProtoReflect.Descriptor instead.

func (*UserEntry) GetAttributes

func (x *UserEntry) GetAttributes() []*AttributeEntry

func (*UserEntry) GetDeletedAt added in v1.0.4

func (x *UserEntry) GetDeletedAt() int64

func (*UserEntry) GetFiles added in v1.0.4

func (x *UserEntry) GetFiles() []*FileEntry

func (*UserEntry) GetUserId

func (x *UserEntry) GetUserId() string

func (*UserEntry) GetVersion

func (x *UserEntry) GetVersion() int64

func (*UserEntry) ProtoMessage

func (*UserEntry) ProtoMessage()

func (*UserEntry) ProtoReflect

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

func (*UserEntry) Reset

func (x *UserEntry) Reset()

func (*UserEntry) String

func (x *UserEntry) String() string

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)
	//
	// Quick user get request, only attributes and file names
	//
	Head(ctx context.Context, in *HeadRequest, opts ...grpc.CallOption) (*UserEntry, error)
	//
	// Get user with all attributes
	//
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*UserEntry, 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) (*CapacityResponse, 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 {
	//
	// 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
	//
	// Quick user get request, only attributes and file names
	//
	Head(context.Context, *HeadRequest) (*UserEntry, error)
	//
	// Get user with all attributes
	//
	Get(context.Context, *GetRequest) (*UserEntry, 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) (*CapacityResponse, 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
}

Directories

Path Synopsis
third_party

Jump to

Keyboard shortcuts

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