cloud

package
v0.0.0-...-efb7c8a Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccountExists   = errors.New("user account already exists")
	ErrAccountNotFound = errors.New("user account not found")
)

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	CreateAccount(ctx context.Context, auth *pb.Auth) error
	GetByName(ctx context.Context, username string) (*pb.Auth, error)
}

type DB

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

func NewDB

func NewDB(databaseDSN string) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) CreateAccount

func (db *DB) CreateAccount(ctx context.Context, auth *pb.Auth) error

func (*DB) CreateSecrets

func (db *DB) CreateSecrets(ctx context.Context, auth *pb.Auth, secrets []*pb.Secret) error

func (*DB) DeleteSecrets

func (db *DB) DeleteSecrets(ctx context.Context, auth *pb.Auth, secrets []*pb.Secret) error

func (*DB) GetByName

func (db *DB) GetByName(ctx context.Context, username string) (*pb.Auth, error)

func (*DB) ListSecrets

func (db *DB) ListSecrets(ctx context.Context, auth *pb.Auth) ([]*pb.Secret, error)

func (*DB) UpdateSecrets

func (db *DB) UpdateSecrets(ctx context.Context, auth *pb.Auth, secrets []*pb.Secret) error

type Secrets

type Secrets interface {
	CreateSecrets(ctx context.Context, auth *pb.Auth, secrets []*pb.Secret) error
	DeleteSecrets(ctx context.Context, auth *pb.Auth, secrets []*pb.Secret) error
	UpdateSecrets(ctx context.Context, auth *pb.Auth, secrets []*pb.Secret) error
	ListSecrets(ctx context.Context, auth *pb.Auth) ([]*pb.Secret, error)
}

Jump to

Keyboard shortcuts

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