ticket

package
v0.0.0-...-47484d2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Get(c *gin.Context)
	GetByID(c *gin.Context)
	Create(c *gin.Context)
}

Handler ...

func NewTicketHandler

func NewTicketHandler(ticketService Service) Handler

NewTicketHandler ...

type Model

type Model struct {
	ID          string    `json:"id" db:"id"`
	Creator     string    `json:"creator" db:"creator"`
	Assigned    string    `json:"assigned" db:"assigned"`
	Title       string    `json:"title" db:"title"`
	Description string    `json:"description" db:"description"`
	Status      string    `json:"status" db:"status"`
	Points      int       `json:"points" db:"points"`
	Created     time.Time `json:"created" db:"created"`
	Updated     time.Time `json:"updated" db:"updated"`
	Deleted     time.Time `json:"deleted" db:"deleted"`
}

Model ...

type Repository

type Repository interface {
	Create(ticket *Model) error
	FindByID(id string) (*Model, error)
	FindAll() ([]*Model, error)
}

Repository .. TODO

type Service

type Service interface {
	CreateTicket(ticket *Model) error
	FindTicketByID(id string) (*Model, error)
	FindAllTickets() ([]*Model, error)
}

Service ...

func NewTicketService

func NewTicketService(repo Repository) Service

NewTicketService ...

Jump to

Keyboard shortcuts

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