authenticated

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Connection() Connection
	Identity() Identity
	Proposition() Proposition
	Transaction() Transaction
	Swap() Swap
}

Application represents an authenticated shareholder application

type Builder

type Builder interface {
	Create() Builder
	WithName(name string) Builder
	WithSeed(seed string) Builder
	WithPassword(pass string) Builder
	Now() (Application, error)
}

Builder represents an application builder

type Connection

type Connection interface {
	Request(host string, port uint) error
	Accept(requestHash hash.Hash, name string) error
	Deny(requestHash hash.Hash) error
	Block(connID *uuid.UUID) error
	Update(connID *uuid.UUID, updateConnection UpdateConnection) error
}

Connection represents a connection application

type Identity

type Identity interface {
	Retrieve() (identities.Identity, error)
	Update(update UpdateIdentity) error
	Delete() error
}

Identity represents the identity application

type Proposition

type Proposition interface {
	New(content propositions.Content, sigs []signature.RingSignature) error
	Approve(propositionHash hash.Hash) error
	Cancel(propositionHash hash.Hash) error
	Disapprove(propositionHash hash.Hash) error
}

Proposition represents an authenticated proposition application

type Swap

type Swap interface {
	Request(fromGovID *uuid.UUID, amount uint, seed string, to []hash.Hash, forGov *uuid.UUID, expireOn time.Time) error
	Trade(requestHash hash.Hash, expireOn time.Time) error
	Close(tradeHash hash.Hash) error
}

Swap represents a swap application

type Transaction

type Transaction interface {
	Payment(govID *uuid.UUID, amount uint, note string) error
	Transfer(govID *uuid.UUID, amount uint, seed string, to []hash.Hash, note string) error
	View(govID *uuid.UUID, amount uint, seed string) (views.Section, error)
	ViewTransfer(section views.Section, govID *uuid.UUID, to []hash.Hash) (views.Transfer, error)
	Receive(view views.Section, pk signature.PrivateKey, note string) error
}

Transaction represents a transaction application

type UpdateConnection

type UpdateConnection interface {
	HasServer() bool
	Server() servers.Server
	HasName() bool
	Name() string
	HasRank() bool
	Rank() uint
}

UpdateConnection represents an update connection

type UpdateConnectionBuilder

type UpdateConnectionBuilder interface {
	Create() UpdateConnectionBuilder
	WithServer(server servers.Server) UpdateConnectionBuilder
	WithName(name string) UpdateConnectionBuilder
	WithRank(rank uint) UpdateConnectionBuilder
	Now() (UpdateConnection, error)
}

UpdateConnectionBuilder represents an update connection builder

type UpdateIdentity

type UpdateIdentity interface {
	HasName() bool
	Name() string
	HasSeed() bool
	Seed() string
	HasPassword() bool
	Password() string
}

UpdateIdentity represents an update identity

type UpdateIdentityBuilder

type UpdateIdentityBuilder interface {
	Create() UpdateIdentityBuilder
	WithName(name string) UpdateIdentityBuilder
	WithSeed(seed string) UpdateIdentityBuilder
	WithPassword(password string) UpdateIdentityBuilder
	Now() (UpdateIdentity, error)
}

UpdateIdentityBuilder represents an update identity builder

func NewUpdateIdentityBuilder

func NewUpdateIdentityBuilder() UpdateIdentityBuilder

NewUpdateIdentityBuilder creates a new updateIdentity builder

Jump to

Keyboard shortcuts

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