user

package
v0.0.0-...-ca93976 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxUint8  = 1<<8 - 1
	MaxKeyIds = 1<<(2*8) - 1
	MaxNonce  = 1<<(10*8) - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	*cycapv1.User
	// contains filtered or unexported fields
}

func NewUser

func NewUser(name, email, passphrase string) (*User, error)

NewUser creates a user given an ephemeral passphrase. The passphrase should only exist in memory until this function returns.

func (*User) EncryptPrivateKey

func (u *User) EncryptPrivateKey() error

func (*User) GetCache

func (u *User) GetCache(c cache.Cache) error

func (*User) GetDatabase

func (u *User) GetDatabase(db database.Database) error

func (*User) NewId

func (u *User) NewId() error

func (*User) NewKeyEncryptionKey

func (u *User) NewKeyEncryptionKey(passphrase string) error

func (*User) NewKeyPair

func (u *User) NewKeyPair() error

func (*User) SetCache

func (u *User) SetCache(c cache.Cache) error

func (*User) SetDatabase

func (u *User) SetDatabase(db database.Database) error

func (*User) String

func (u *User) String() string

func (*User) Validate

func (u *User) Validate() error

type UserServer

type UserServer struct {
	*config.Config
	log.Logger
}

func (*UserServer) CreateUser

func (u *UserServer) CreateUser(ctx context.Context, req *connect.Request[cycapv1.CreateUserRequest]) (*connect.Response[cycapv1.CreateUserResponse], error)

Jump to

Keyboard shortcuts

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