domain

package
v0.0.0-...-2847b59 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 0 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Id          int64    `db:"issue_id"`
	Title       string   `db:"issue_title"`
	Description string   `db:"issue_description"`
	ProjectId   int64    `db:"issue_projectId"`
	OwnerId     int64    `db:"issue_ownerId"`
	Status      Status   `db:"issue_status"`
	Priority    Priority `db:"issue_priority"`
}

Issue represents a Project task

type IssueRepository

type IssueRepository interface {
	GetById(id int64) (*Issue, error)
	All() ([]*Issue, error)
	Create(issue *Issue) error
	Delete(id int64) error
}

type IssueService

type IssueService interface {
	Issue(id int64) (*Issue, error)
	Issues() ([]*Issue, error)
	Create(issue *Issue) error
	Delete(id int64) error
}

type Priority

type Priority string

Priority represents an issue importance

var (
	PriorityLow    Priority = "Low"
	PriorityMedium Priority = "Medium"
	PriorityHigh   Priority = "High"
)

type Project

type Project struct {
	Id          int64  `db:"project_id"`
	Name        string `db:"project_name"`
	OwnerId     int64  `db:"project_ownerId"`
	Description string `db:"project_description"`
}

Project represents a top level collection of related issues

type ProjectRepository

type ProjectRepository interface {
	GetById(id int64) (*Project, error)
	All() ([]*Project, error)
	Create(issue *Project) error
	Delete(id int64) error
}

type ProjectService

type ProjectService interface {
	Project(id int64) (*Project, error)
	Projects() ([]*Project, error)
	Create(p *Project) error
	Delete(id int64) error
}

type Status

type Status string

Status represents an issue status type

var StatusDone Status = "Done"
var StatusInProgress Status = "In Progress"
var StatusTodo Status = "Todo"

type User

type User struct {
	Id      int64  `db:"user_id"`
	Name    string `db:"user_name"`
	Surname string `db:"user_surname"`
	Email   string `db:"user_email"`
}

User represents a user in the System

type UserRepository

type UserRepository interface {
	GetById(id int64) (*User, error)
	All() ([]*User, error)
	Create(issue *User) error
	Delete(id int64) error
}

type UserService

type UserService interface {
	User(id int64) (*User, error)
	Users() ([]*User, error)
	Create(u *User) error
	Delete(id int64) error
}

Jump to

Keyboard shortcuts

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