userid

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: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

userid

User ID Service API and Client

Documentation

Index

Constants

View Source
const (
	ServiceName = "userid.UserService"
)

Variables

View Source
var ClientClass = reflect.TypeOf((*Client)(nil)).Elem()
View Source
var ClientMaxReceiveMessageSize = 1024 * 1024 * 100

Functions

func Dial

func Dial(ctx context.Context, endpoint, token string, tlsConfigOpt *tls.Config) (*grpc.ClientConn, error)

func DialWithLoadBalancer

func DialWithLoadBalancer(ctx context.Context, multipointEndpoint, serviceName, token string, tlsConfigOpt *tls.Config) (*grpc.ClientConn, error)

Types

type Client

type Client interface {
	glue.InitializingBean
	glue.DisposableBean

	//
	// Gets metadata about using attributes
	//
	GetCounts(ctx context.Context, in *emptypb.Empty) (*useridpb.Counts, error)

	//
	// Quick user lookup request
	//
	Lookup(ctx context.Context, in *useridpb.LookupRequest) (*useridpb.UserEntity, error)

	//
	// Search users by indexed non-unique attributes
	//
	Search(ctx context.Context, in *useridpb.SearchRequest) (entries <-chan UserEntryEvent, cancel func(), err error)

	//
	// Get user with all attributes
	//
	Get(ctx context.Context, in *useridpb.GetRequest) (*useridpb.UserEntity, error)

	//
	// Create user, returns new user_id
	//
	Create(ctx context.Context, in *useridpb.CreateRequest) (*useridpb.CreateResponse, error)

	//
	// Delete user request (sets TTL to all PII data for particular user)
	//
	Delete(ctx context.Context, in *useridpb.DeleteRequest) error

	//
	// Update user attributes
	//
	Update(ctx context.Context, in *useridpb.UpdateRequest) error

	//
	// Scan users
	//
	Scan(ctx context.Context, in *useridpb.ScanRequest) (entries <-chan UserEntryEvent, cancel func(), err error)

	//
	// Allocate user id range
	//
	AddRange(ctx context.Context, in *useridpb.Range) error

	//
	// Gets user id ranges and etc
	//
	GetCapacity(ctx context.Context) (*useridpb.Capacity, error)
}

func NewClient

func NewClient(ctx context.Context, commaSeparatedEndpoints, token string, tlsConfigOpt *tls.Config) (Client, error)

type TokenAuth

type TokenAuth string

func (TokenAuth) GetRequestMetadata

func (t TokenAuth) GetRequestMetadata(_ context.Context, in ...string) (map[string]string, error)

func (TokenAuth) RequireTransportSecurity

func (TokenAuth) RequireTransportSecurity() bool

type UserEntryEvent

type UserEntryEvent struct {
	Err   error
	Entry *useridpb.UserEntity
}

Jump to

Keyboard shortcuts

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