governments

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: 7 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
	WithID(id *uuid.UUID) Builder
	WithCurrent(current Content) Builder
	WithShareHolders(shareholders shareholders.ShareHolders) Builder
	WithPrevious(prev Government) Builder
	Now() (Government, error)
}

Builder represents a government builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type Content

type Content interface {
	Hash() hash.Hash
	Chain() chains.Chain
	MinPowerToPassResolution() uint
	MinPowerToPropose() uint
	CanCancelVote() bool
	SharesVelocity() uint
	SharesCap() uint
	CreatedOn() time.Time
}

Content represents a government content

type ContentBuilder

type ContentBuilder interface {
	Create() ContentBuilder
	WithChain(chain chains.Chain) ContentBuilder
	WithMinPowerToPassResolution(minPowerToPassRes uint) ContentBuilder
	WithMinPowerToPropose(minPowerToPropose uint) ContentBuilder
	WithSharesVelocity(sharesVelocity uint) ContentBuilder
	WithSharesCap(sharesCap uint) ContentBuilder
	CanCancelVote() ContentBuilder
	CreatedOn(createdOn time.Time) ContentBuilder
	Now() (Content, error)
}

ContentBuilder represents a content builder

func NewContentBuilder

func NewContentBuilder() ContentBuilder

NewContentBuilder creates a new content builder instance

type Government

type Government interface {
	Hash() hash.Hash
	ID() *uuid.UUID
	Current() Content
	ShareHolders() shareholders.ShareHolders
	HasPrevious() bool
	Previous() Government
}

Government represents a government

type Repository

type Repository interface {
	Retrieve(id *uuid.UUID) (Government, error)
}

Repository represents a government repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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