generic

package
v0.0.0-...-d51db54 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID       *int           `json:"id,omitempty"`
	TaskID   *int           `json:"task_id,omitempty"`
	AuthorID *int           `json:"author_id,omitempty"`
	TimeAgo  *time.Duration `json:"time_ago,omitempty"`
	Text     *string        `json:"text,omitempty"`
}

func AllocateComment

func AllocateComment() *Comment

type CommonDate

type CommonDate struct {
	time.Time
}

func (*CommonDate) MarshalJSON

func (t *CommonDate) MarshalJSON() ([]byte, error)

func (*CommonDate) Scan

func (t *CommonDate) Scan(value interface{}) error

func (*CommonDate) String

func (t *CommonDate) String() string

func (*CommonDate) UnmarshalJSON

func (t *CommonDate) UnmarshalJSON(b []byte) (err error)

func (*CommonDate) Value

func (t *CommonDate) Value() (driver.Value, error)

type CommonDuration

type CommonDuration struct {
	time.Duration
}

func (CommonDuration) MarshalJSON

func (d CommonDuration) MarshalJSON() ([]byte, error)

func (*CommonDuration) UnmarshalJSON

func (d *CommonDuration) UnmarshalJSON(b []byte) error

type Credentials

type Credentials struct {
	Hash string
	Salt string
	Algo string
}

type DependentTask

type DependentTask struct {
	ID                 int    `json:"id"`
	TaskDependencyType string `json:"dependency_type"`
}

type Issue

type Issue struct {
	// ID        int           `json:"id"`
	Project     *int         `json:"project,omitempty"`
	Name        *string      `json:"name,omitempty"`
	Description *string      `json:"description,omitempty"`
	Status      *IssueStatus `json:"status,omitempty"`
	StartDate   *CommonDate  `json:"start_date,omitempty"`
	CloseDate   *CommonDate  `json:"close_date,omitempty"`
	Registrar   *int         `json:"registrar,omitempty"`
	Reporter    *string      `json:"reporter,omitempty"`

	//Recursively acquired data
	Attachments *[]string `json:"attachments,omitempty"`
}

func AllocateIssue

func AllocateIssue() *Issue

type IssueStatus

type IssueStatus string
const (
	Open     IssueStatus = "open"
	Closed   IssueStatus = "closed"
	Reopened IssueStatus = "reopened"
)

type Project

type Project struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	LogoPath    *string `json:"logo_path,omitempty"`
	OwnerID     *int    `json:"owner,omitempty"`

	//Recursively acquired fields
	Managers      *[]int `json:"managers,omitempty"`
	Workers       *[]int `json:"workers,omitempty"`
	SupportAgents *[]int `json:"support_agents,omitempty"`
}

func AllocateProject

func AllocateProject() *Project

type ReportBase

type ReportBase struct {
	ID        int    `json:"id"`
	Username  string `json:"username"`
	Firstname string `json:"firstname"`
	Lastname  string `json:"lastname"`
}

type Task

type Task struct {
	// ID        int           `json:"id"`
	Project     *int          `json:"project,omitempty"`
	Name        *string       `json:"name,omitempty"`
	Description *string       `json:"description,omitempty"`
	Status      *TaskStatus   `json:"status,omitempty"`
	Priority    *TaskPriority `json:"priority,omitempty"`
	StartDate   *CommonDate   `json:"start_date,omitempty"`
	DueDate     *CommonDate   `json:"due_date,omitempty"`
	Assigner    *int          `json:"assigner,omitempty"`
	Assignees   *[]int        `json:"assignees,omitempty"`

	//Recursively acquired data
	LinkedIssues   *[]int            `json:"linked_issues,omitempty"`
	DependentTasks *[]DependentTask  `json:"dependent_tasks,omitempty"`
	Comments       *[]Comment        `json:"comments,omitempty"`
	TrackedRecords *[]TrackingRecord `json:"tracked_records,omitempty"`
	Attachments    *[]string         `json:"attachments,omitempty"`
}

func AllocateTask

func AllocateTask() *Task

type TaskDependencyType

type TaskDependencyType string
const (
	BlockedBy TaskDependencyType = "blocked-by"
	Includes  TaskDependencyType = "includes"
)

type TaskPriority

type TaskPriority string
const (
	Highest TaskPriority = "highest"
	High    TaskPriority = "high"
	Middle  TaskPriority = "middle"
	Low     TaskPriority = "low"
	Lowest  TaskPriority = "lowest"
)

type TaskStatus

type TaskStatus string
const (
	ToDo       TaskStatus = "to-do"
	InProgress TaskStatus = "in-progress"
	Testing    TaskStatus = "testing"
	Waiting    TaskStatus = "waiting"
	Done       TaskStatus = "done"
)

type TasksReport

type TasksReport struct {
	ReportBase
	Tasks        int `json:"tasks"`
	DoneTasks    int `json:"done_tasks"`
	Issues       int `json:"issues"`
	ClosedIssues int `json:"closed_issues"`
}

type TimeEfficiencyReport

type TimeEfficiencyReport struct {
	ReportBase
	TrackedRecords  int     `json:"tasks"`
	SummaryHours    float64 `json:"summary"`
	AveragePerDay   float64 `json:"average_per_day"`
	AveragePerMonth float64 `json:"average_per_months"`
}

type TrackingRecord

type TrackingRecord struct {
	TaskID   *int            `json:"task_id,omitempty"`
	EndDate  *CommonDate     `json:"end_date,omitempty"`
	Duration *CommonDuration `json:"duration,omitempty"`
	Text     *string         `json:"text,omitempty"`
}

func AllocateTrackingRecord

func AllocateTrackingRecord() *TrackingRecord

type User

type User struct {
	ID         int     `json:"id,omitempty"`
	Email      *string `json:"email,omitempty"`
	Username   *string `json:"username,omitempty"`
	Firstname  *string `json:"firstname,omitempty"`
	Lastname   *string `json:"lastname,omitempty"`
	AvatarPath *string `json:"avatar_path,omitempty"`
	IsActive   *bool   `json:"is_active,omitempty"`
	IsAdmin    *bool   `json:"is_admin,omitempty"`
	IsDirector *bool   `json:"is_director,omitempty"`
}

func AllocateUser

func AllocateUser() *User

Jump to

Keyboard shortcuts

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