propositions

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: 8 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
	WithContent(content Content) Builder
	WithSignatures(sigs []signature.RingSignature) Builder
	Now() (Proposition, error)
}

Builder represents a proposition builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type Content

type Content interface {
	Hash() hash.Hash
	Government() governments.Government
	Section() Section
	ActiveOn() time.Time
	Deadline() time.Time
	CreatedOn() time.Time
}

Content represents a proposition content

type ContentBuilder

type ContentBuilder interface {
	Create() ContentBuilder
	WithGovernment(gov governments.Government) ContentBuilder
	WithSection(section Section) ContentBuilder
	WithDeadline(deadline time.Time) ContentBuilder
	ActiveOn(activeOn time.Time) 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 Proposition

type Proposition interface {
	Hash() hash.Hash
	Content() Content
	Signatures() []signature.RingSignature
}

Proposition represents a proposition

type Repository

type Repository interface {
	Retrieve(hash hash.Hash) (Proposition, error)
}

Repository represents a proposition repository

type Section

type Section interface {
	Hash() hash.Hash
	IsGovernment() bool
	Government() governments.Content
	IsShareHolders() bool
	ShareHolders() shareholders.ShareHolders
	IsCustom() bool
	Custom() *hash.Hash
}

Section represents a proposition section

type SectionBuilder

type SectionBuilder interface {
	Create() SectionBuilder
	WithGovernment(government governments.Content) SectionBuilder
	WithShareHolders(shareHolders shareholders.ShareHolders) SectionBuilder
	WithCustom(custom hash.Hash) SectionBuilder
	Now() (Section, error)
}

SectionBuilder represents a section builder

func NewSectionBuilder

func NewSectionBuilder() SectionBuilder

NewSectionBuilder creates a new section builder instance

type Service

type Service interface {
	Insert(proposition Proposition) error
}

Service represents a proposition service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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