entity

package
v0.0.0-...-1d8daf6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CycleToProtoList

func CycleToProtoList(cml []Cycle, secure bool) []*cycles.Cycle

func IssueStatusToProtoList

func IssueStatusToProtoList(iml []IssueStatus, secure bool) []*issues.IssueStatus

func IssueToProtoList

func IssueToProtoList(iml []Issue, secure bool) []*issues.Issue

func RoleToProtoList

func RoleToProtoList(rml []Role) []*roles.Role

func UserToProtoList

func UserToProtoList(uml []User, secure bool) []*users.User

func WorkspaceToProtoList

func WorkspaceToProtoList(rml []Workspace) []*workspaces.Workspace

Types

type AuditLog

type AuditLog struct {
	ID        uint64
	Action    string
	Object    string
	OldData   string
	NewData   string
	ByID      uint64 `pg:"unique:by_id"`
	By        *User  `pg:"rel:has-one"`
	CreatedAt time.Time
	// contains filtered or unexported fields
}

type Cycle

type Cycle struct {
	ID          uint64
	UUID        string `pg:"default:gen_random_uuid()"`
	Title       string
	Description string
	Active      bool
	StartAt     time.Time
	EndAt       time.Time
	CreatedAt   time.Time
	UpdatedAt   time.Time
	// contains filtered or unexported fields
}

func CycleFromProto

func CycleFromProto(cycle *cycles.Cycle) Cycle

func (Cycle) ToProto

func (cm Cycle) ToProto(secure bool) *cycles.Cycle

type Issue

type Issue struct {
	ID          uint64 `pg:",pk"`
	UUID        string `pg:"default:gen_random_uuid()"`
	Title       string
	Description string
	StatusID    uint64       `pg:"unique:status_id"`
	Status      *IssueStatus `pg:"rel:has-one, fk:status"`
	CycleID     uint64       `pg:"unique:cycle_id"`
	Cycle       *Cycle       `pg:"rel:has-one, fk:cycle"`
	Estimate    uint64
	WorkspaceID uint64    `pg:"unique:workspace_id"`
	Workspace   Workspace `pg:"rel:has-one, fk:workspace"`
	AssigneeID  uint64    `pg:"unique:assignee_id"`
	Assignee    *User     `pg:"rel:has-one, fk:assignee"`
	CreatorID   uint64    `pg:"unique:creator_id"`
	Creator     *User     `pg:"rel:has-one, fk:creator"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
	// contains filtered or unexported fields
}

func IssueFromProto

func IssueFromProto(issue *issues.Issue) Issue

func (Issue) ToProto

func (im Issue) ToProto(secure bool) *issues.Issue

type IssueStatus

type IssueStatus struct {
	ID        uint64 `pg:",pk"`
	UUID      string `pg:"default:gen_random_uuid()"`
	Title     string
	CreatedAt time.Time
	UpdatedAt time.Time
	// contains filtered or unexported fields
}

func IssueStatusFromProto

func IssueStatusFromProto(issueStatus *issues.IssueStatus) IssueStatus

func (IssueStatus) ToProto

func (ss IssueStatus) ToProto(secure bool) *issues.IssueStatus

type Role

type Role struct {
	ID        uint64 `pg:",pk"`
	UUID      string `pg:"default:gen_random_uuid()"`
	Title     string
	CreatedAt time.Time
	UpdatedAt time.Time
	// contains filtered or unexported fields
}

func RoleFromProto

func RoleFromProto(role *roles.Role) Role

func (Role) ToProto

func (rm Role) ToProto() *roles.Role

type User

type User struct {
	ID        uint64 `pg:",pk"`
	UUID      string `pg:"default:gen_random_uuid()"`
	Username  string `pg:",unique"`
	Password  string
	Email     string `pg:",unique"`
	Enable    bool
	CreatedAt time.Time
	UpdatedAt time.Time
	// contains filtered or unexported fields
}

func UserFromProto

func UserFromProto(user *users.User) User

func (User) ToProto

func (um User) ToProto(secure bool) *users.User

type Workspace

type Workspace struct {
	ID        uint64 `pg:",pk"`
	UUID      string `pg:"default:gen_random_uuid()"`
	Title     string
	Domain    string `pg:",unique"`
	CreatedAt time.Time
	UpdatedAt time.Time
	// contains filtered or unexported fields
}

func WorkspaceFromProto

func WorkspaceFromProto(workspace *workspaces.Workspace) Workspace

func (Workspace) ToProto

func (rm Workspace) ToProto() *workspaces.Workspace

Jump to

Keyboard shortcuts

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