repo

package
v0.0.0-...-709c55d Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoTicketRepository

type MongoTicketRepository struct {
	// contains filtered or unexported fields
}

func (*MongoTicketRepository) Add

func (r *MongoTicketRepository) Add(ticket model.Ticket) error

func (*MongoTicketRepository) Delete

func (r *MongoTicketRepository) Delete(ID string) error

func (*MongoTicketRepository) FindAll

func (r *MongoTicketRepository) FindAll() []model.Ticket

func (*MongoTicketRepository) FindAllByStatus

func (r *MongoTicketRepository) FindAllByStatus(status model.Status) []model.Ticket

func (*MongoTicketRepository) FindByID

func (r *MongoTicketRepository) FindByID(ID string) model.Ticket

func (*MongoTicketRepository) Update

func (r *MongoTicketRepository) Update(ticket model.Ticket) error

type TicketRepository

type TicketRepository interface {
	FindByID(ID string) model.Ticket
	FindAll() []model.Ticket
	FindAllByStatus(status model.Status) []model.Ticket
	Add(ticket model.Ticket) error
	Update(ticket model.Ticket) error
	Delete(ID string) error
}

func NewMongoTicketRepository

func NewMongoTicketRepository(client *mongo.Client) TicketRepository

Jump to

Keyboard shortcuts

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