Documentation ¶
Index ¶
- type MongoTicketRepository
- func (r *MongoTicketRepository) Add(ticket model.Ticket) error
- func (r *MongoTicketRepository) Delete(ID string) error
- func (r *MongoTicketRepository) FindAll() []model.Ticket
- func (r *MongoTicketRepository) FindAllByStatus(status model.Status) []model.Ticket
- func (r *MongoTicketRepository) FindByID(ID string) model.Ticket
- func (r *MongoTicketRepository) Update(ticket model.Ticket) error
- type TicketRepository
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) 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
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
Click to show internal directories.
Click to hide internal directories.