Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Project ¶
type Project struct { ID int Identifier string Title string Description string CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time }
Project is the struct for projects
type ProjectStore ¶
type ProjectStore struct {
// contains filtered or unexported fields
}
ProjectStore provides the repository for Projects
func NewProjectStore ¶
func NewProjectStore(db *gorm.DB) *ProjectStore
func (*ProjectStore) Create ¶
func (p *ProjectStore) Create(project *Project) (*Project, error)
Create will attempt to create a new Project
func (*ProjectStore) Delete ¶
func (p *ProjectStore) Delete(project *Project) (*Project, error)
Delete will destroy an existing Project based on its given id
func (*ProjectStore) Get ¶
func (p *ProjectStore) Get(id int) (*Project, error)
Get will return a single Project based on an id given
func (*ProjectStore) List ¶
func (p *ProjectStore) List() ([]*Project, error)
List will provide all projects the sotre can find
type ProjectStorer ¶
type ProjectStorer interface { Get(int) (*Project, error) List() ([]*Project, error) Create(*Project) (*Project, error) Delete(*Project) (*Project, error) Update(*Project) (*Project, error) }
ProjectStorer defines an interface for ProjectDataStorers
type Ticket ¶
type Ticket struct { ID int Subject string Description string Project Project CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time }
Ticket is the struct for Tickets
type TicketStore ¶
type TicketStore struct {
// contains filtered or unexported fields
}
TicketStore provides the repository for Tickets
func NewTicketStore ¶
func NewTicketStore(db *gorm.DB) *TicketStore
func (*TicketStore) Create ¶
func (p *TicketStore) Create(ticket *Ticket) (*Ticket, error)
Create will attempt to create a new Ticket
func (*TicketStore) Delete ¶
func (p *TicketStore) Delete(ticket *Ticket) (*Ticket, error)
Delete will destroy an existing Ticket based on its given id
func (*TicketStore) Get ¶
func (p *TicketStore) Get(id int) (*Ticket, error)
Get will return a single Ticket based on an id given
func (*TicketStore) List ¶
func (p *TicketStore) List() ([]*Ticket, error)
List will provide all Tickets the store can find