user

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataContainerID

type DataContainerID struct {
	// contains filtered or unexported fields
}

DataContainerID uniquely identifies a container where a user can store a copy of their data

func GetDataContainerIDFromProto

func GetDataContainerIDFromProto(proto *commonpb.DataContainerId) (*DataContainerID, error)

GetDataContainerIDFromProto returns a UserID from the protobuf message

func GetDataContainerIDFromString

func GetDataContainerIDFromString(value string) (*DataContainerID, error)

GetDataContainerIDFromString parses a DataContainerID from a string value

func NewDataContainerID

func NewDataContainerID() *DataContainerID

NewDataContainerID returns a new random DataContainerID

func (*DataContainerID) Proto

Proto returns a UserID into its protobuf message form

func (*DataContainerID) String

func (id *DataContainerID) String() string

String returns the string form of a DataContainerID

func (*DataContainerID) Validate

func (id *DataContainerID) Validate() error

Validate validate a DataContainerID

type IdentifyingFeatures

type IdentifyingFeatures struct {
	PhoneNumber *string
}

IdentifyingFeatures are a set of features that can be used to deterministaclly identify a user.

func (*IdentifyingFeatures) Validate

func (f *IdentifyingFeatures) Validate() error

Validate validates an IdentifyingFeatures

type UserID

type UserID struct {
	// contains filtered or unexported fields
}

UserID uniquely identifies a user

func GetUserIDFromProto

func GetUserIDFromProto(proto *commonpb.UserId) (*UserID, error)

GetUserIDFromProto returns a UserID from the protobuf message

func GetUserIDFromString

func GetUserIDFromString(value string) (*UserID, error)

GetUserIDFromString parses a UserID from a string value

func NewUserID

func NewUserID() *UserID

NewUserID returns a new random UserID

func (*UserID) Proto

func (id *UserID) Proto() *commonpb.UserId

Proto returns a UserID into its protobuf message form

func (*UserID) String

func (id *UserID) String() string

String returns the string form of a UserID

func (*UserID) Validate

func (id *UserID) Validate() error

Validate validate a UserID

type View

type View struct {
	PhoneNumber *string
}

View is a well-defined set of identifying features. It is contrained to having exactly one feature set. The semantics for overlapping views have not been defined, if they even make sense to begin with.

func (*View) Validate

func (v *View) Validate() error

Validate validates a View

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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