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 WithPrevious(prev Government) Builder Now() (Government, error) }
Builder represents a government builder
type Content ¶
type Content interface { Hash() hash.Hash Chain() chains.Chain MinPowerToPassResolution() uint MinPowerToPropose() uint CanCancelVote() bool 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 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 HasPrevious() bool Previous() Government }
Government represents a government
type Repository ¶
type Repository interface {
Retrieve(id *uuid.UUID) (Government, error)
}
Repository represents a government repository
Click to show internal directories.
Click to hide internal directories.