entity

package
v0.0.0-...-ccedb5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Type     []Type     `json:"type"`
	State    []State    `json:"state"`
	Priority []Priority `json:"priority"`
	Persone  []Persone  `json:"persone"`
	Release  []Release  `json:"release"`
	Sprint   []Sprint   `json:"sprint"`
	// contains filtered or unexported fields
}

func CreateDefaultCatalog

func CreateDefaultCatalog() *Catalog

func (*Catalog) Changed

func (c *Catalog) Changed() bool

func (*Catalog) EnsurePersone

func (c *Catalog) EnsurePersone(name string, login string, email string) Id

func (*Catalog) FindPersone

func (c *Catalog) FindPersone(id Id) *Persone

func (*Catalog) FindPersoneByAlias

func (c *Catalog) FindPersoneByAlias(alias string) *Persone

func (*Catalog) MarkSaved

func (c *Catalog) MarkSaved()

type Change

type Change struct {
	Id          Id        `json:"id"`
	IssueNumber Id        `json:"issueid"`
	Date        Timestamp `json:"date"`
	Persone     Id        `json:"personeid"`
	Before      Status    `json:"before"`
	After       Status    `json:"after"`
}

func (*Change) GetID

func (c *Change) GetID() Id

func (*Change) Parent

func (c *Change) Parent() Id

type Comment

type Comment struct {
	Id           Id        `json:"id"`
	IssueNumber  Id        `json:"issueid"`
	ParentNumber Id        `json:"parentid"` // means 'parent comment'
	Date         Timestamp `json:"date"`
	AuthorNumber Id        `json:"personid"`
	Text         string    `json:"text"`
}

func (*Comment) GetID

func (c *Comment) GetID() Id

func (*Comment) Parent

func (c *Comment) Parent() Id

type Dependent

type Dependent interface {
	Identable
	Parent() Id
}

type Id

type Id uint32

type Identable

type Identable interface {
	GetID() Id
}

type Issue

type Issue struct {
	Status      Status    `json:"status"`
	Number      Id        `json:"id"`
	Date        Timestamp `json:"date"` // NOTE: no date until 'New' state
	Title       string    `json:"title"`
	Description string    `json:"text"`
}

func (*Issue) GetID

func (i *Issue) GetID() Id

type Persone

type Persone struct {
	Number Id     `json:"id"`
	Name   string `json:"name"`
	Alias  string `json:"alias"`
	Email  string `json:"email"`
}

func (*Persone) GetID

func (p *Persone) GetID() Id

type Priority

type Priority struct {
	Number Id     `json:"id"`
	Name   string `json:"name"`
	Weight Weight `json:"weight"`
}

func (*Priority) GetID

func (p *Priority) GetID() Id

type Release

type Release struct {
	Number    Id        `json:"id"`
	StartDate Timestamp `json:"start"`
	EndDate   Timestamp `json:"end"`
	Done      bool      `json:"done"`
	Title     string    `json:"title"`
}

func (*Release) Backlog

func (r *Release) Backlog() bool

func (*Release) Canceled

func (r *Release) Canceled() bool

func (*Release) GetID

func (r *Release) GetID() Id

func (*Release) Predefined

func (r *Release) Predefined() bool

type Sprint

type Sprint struct {
	ReleaseNumber Id        `json:"releaseid"`
	Number        Id        `json:"id"`
	StartDate     Timestamp `json:"start"`
	EndDate       Timestamp `json:"end"`
	Done          bool      `json:"done"`
}

func (*Sprint) GetID

func (s *Sprint) GetID() Id

func (*Sprint) Parent

func (s *Sprint) Parent() Id

type State

type State struct {
	Number Id     `json:"id"`
	Weight Weight `json:"weight"`
	Name   string `json:"name"`
}

func (*State) GetID

func (s *State) GetID() Id

type Status

type Status struct {
	ReporterNumber Id `json:"reporterid"`
	ReleaseNumber  Id `json:"releaseid"`
	SprintNumber   Id `json:"sprintid"`
	TypeNuber      Id `json:"typid"`
	ParentNumber   Id `json:"parentid"`
	PriorityNumber Id `json:"priorityid"`
	StateNumber    Id `json:"stateid"`
}

type Timestamp

type Timestamp int64

func ToTimestamp

func ToTimestamp(t *time.Time) Timestamp

func (Timestamp) ToDatetime

func (t Timestamp) ToDatetime() time.Time

type Type

type Type struct {
	Number Id     `json:"id"`
	Name   string `json:"name"`
}

func (*Type) GetID

func (t *Type) GetID() Id

type Weight

type Weight uint32

Jump to

Keyboard shortcuts

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