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
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 IsCustom() bool Custom() *hash.Hash }
Section represents a proposition section
type SectionBuilder ¶
type SectionBuilder interface { Create() SectionBuilder WithGovernment(government governments.Content) 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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.