identities

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Create() Builder
	WithName(name string) Builder
	WithSeed(seed string) Builder
	WithShareHolders(shareHolders ShareHolders) Builder
	WithConnections(connections Connections) Builder
	Now() (Identity, error)
}

Builder represents an identity builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder

type Connection

type Connection interface {
	ID() *uuid.UUID
	Profile() Profile
	Connection() connections.Connection
	Server() servers.Server
	SigPK() signature.PrivateKey
	EncPK() encryption.PrivateKey
}

Connection represents a connection

type ConnectionBuilder

type ConnectionBuilder interface {
	Create() ConnectionBuilder
	WithID(id *uuid.UUID) ConnectionBuilder
	WithProfile(profile Profile) ConnectionBuilder
	WithConnection(conn connections.Connection) ConnectionBuilder
	WithServer(server servers.Server) ConnectionBuilder
	WithSignaturePK(sigPK signature.PrivateKey) ConnectionBuilder
	WithEncryptionPK(encPK encryption.PrivateKey) ConnectionBuilder
	Now() (Connection, error)
}

ConnectionBuilder represenst a connection builder

func NewConnectionBuilder

func NewConnectionBuilder(encBitrate int) ConnectionBuilder

NewConnectionBuilder creates a new connection builder

type Connections

type Connections interface {
	All() []Connection
}

Connections represents connections

type ConnectionsBuilder

type ConnectionsBuilder interface {
	Create() ConnectionsBuilder
	WithConnections(connections []Connection) ConnectionsBuilder
	Now() (Connections, error)
}

ConnectionsBuilder represents a connections builder

func NewConnectionsBuilder

func NewConnectionsBuilder() ConnectionsBuilder

NewConnectionsBuilder creates a new connections builder

type Identity

type Identity interface {
	Name() string
	Seed() string
	ShareHolders() ShareHolders
	Connections() Connections
}

Identity represents an identity

type Profile

type Profile interface {
	Name() string
	HasRank() bool
	Rank() uint
}

Profile represents a connection profile

type ProfileBuilder

type ProfileBuilder interface {
	Create() ProfileBuilder
	WithName(name string) ProfileBuilder
	WithRank(rank uint) ProfileBuilder
	Now() (Profile, error)
}

ProfileBuilder represents a profile builder

func NewProfileBuilder

func NewProfileBuilder() ProfileBuilder

NewProfileBuilder creates a new profile builder

type Repository

type Repository interface {
	List() ([]string, error)
	Retrieve(name string, seed string, password string) (Identity, error)
}

Repository represents an identity repository

type Service

type Service interface {
	Insert(ins Identity, password string) error
	Update(origin Identity, updated Identity, password string) error
	UpdateWithPassword(origin Identity, updated Identity, originalPassword string, updatedPassword string) error
	Delete(ins Identity, password string) error
}

Service represents a shareholders service

type ShareHolder

type ShareHolder interface {
	Government() governments.Government
	Public() shareholders.ShareHolder
	SigPK() signature.PrivateKey
}

ShareHolder represents a shareholder

type ShareHolderBuilder

type ShareHolderBuilder interface {
	Create() ShareHolderBuilder
	WithGovernment(gov governments.Government) ShareHolderBuilder
	WithPublic(public shareholders.ShareHolder) ShareHolderBuilder
	WithSigPK(sigPK signature.PrivateKey) ShareHolderBuilder
	Now() (ShareHolder, error)
}

ShareHolderBuilder represents a shareholder builder

func NewShareHolderBuilder

func NewShareHolderBuilder() ShareHolderBuilder

NewShareHolderBuilder creates a new shareHolder builder instance

type ShareHolders

type ShareHolders interface {
	All() []ShareHolder
	Fetch(gov governments.Government) (ShareHolder, error)
}

ShareHolders represents shareholders

type ShareHoldersBuilder

type ShareHoldersBuilder interface {
	Create() ShareHoldersBuilder
	WithShareHolders(shareHolders []ShareHolder) ShareHoldersBuilder
	Now() (ShareHolders, error)
}

ShareHoldersBuilder represents a shareholders builder

func NewShareHoldersBuilder

func NewShareHoldersBuilder() ShareHoldersBuilder

NewShareHoldersBuilder creates a new shareHolders builder instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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