models

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPriority = fmt.Errorf("not a valid Priority, try [%s]", strings.Join(_PriorityNames, ", "))

Functions

func PriorityNames

func PriorityNames() []string

PriorityNames returns a list of possible string values of Priority.

Types

type Board

type Board struct {
	ID       int64
	Name     string
	TopicIds []int64

	CreatedAt time.Time
	UpdatedAt time.Time
}

type Priority

type Priority int32

ENUM(undefined, low, medium, high, critical)

const (
	// PriorityUndefined is a Priority of type Undefined.
	PriorityUndefined Priority = iota
	// PriorityLow is a Priority of type Low.
	PriorityLow
	// PriorityMedium is a Priority of type Medium.
	PriorityMedium
	// PriorityHigh is a Priority of type High.
	PriorityHigh
	// PriorityCritical is a Priority of type Critical.
	PriorityCritical
)

func ParsePriority

func ParsePriority(name string) (Priority, error)

ParsePriority attempts to convert a string to a Priority.

func PriorityValues

func PriorityValues() []Priority

PriorityValues returns a list of the values for Priority

func (*Priority) AppendText

func (x *Priority) AppendText(b []byte) ([]byte, error)

AppendText appends the textual representation of itself to the end of b (allocating a larger slice if necessary) and returns the updated slice.

Implementations must not retain b, nor mutate any bytes within b[:len(b)].

func (Priority) IsValid

func (x Priority) IsValid() bool

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

func (Priority) MarshalText

func (x Priority) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (Priority) Ptr

func (x Priority) Ptr() *Priority

func (Priority) String

func (x Priority) String() string

String implements the Stringer interface.

func (*Priority) UnmarshalText

func (x *Priority) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

type Task

type Task struct {
	ID           int64
	Name         string
	Description  string
	Dependencies []int64
	Priority     Priority

	StartTime  time.Time
	FinishTime time.Time

	CreatedAt time.Time
	UpdatedAt time.Time
}

func (Task) GetDependencies

func (t Task) GetDependencies() []int64

func (Task) GetID

func (t Task) GetID() int64

type Topic

type Topic struct {
	ID      int64
	Name    string
	TaskIds []int64

	CreatedAt time.Time
	UpdatedAt time.Time
}

func (Topic) GetID

func (t Topic) GetID() int64

type UpdatedBoard

type UpdatedBoard struct {
	ID       int64
	Name     *string
	TopicIds []int64
}

type UpdatedTask

type UpdatedTask struct {
	ID           int64
	Name         *string
	Description  *string
	Dependencies []int64
	Priority     *Priority
	StartTime    *time.Time
	FinishTime   *time.Time
}

func (UpdatedTask) GetDependencies

func (t UpdatedTask) GetDependencies() []int64

func (UpdatedTask) GetID

func (t UpdatedTask) GetID() int64

type UpdatedTopic

type UpdatedTopic struct {
	ID      int64
	Name    *string
	TaskIds []int64
}

Jump to

Keyboard shortcuts

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