Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { Id int64 `json:"id" bson:"_id"` Firstname string `json:"firstname" bson:"firstname"` Lastname string `json:"lastname" bson:"lastname"` Email string `json:"email" bson:"email"` }
func (*Customer) Merge ¶
func (c *Customer) Merge(updateCustomer UpdateCustomer)
type CustomerRepository ¶
type CustomerRepository interface { FindById(ctx context.Context, id int64) (*Customer, error) FindByEmail(ctx context.Context, email string) (*Customer, error) Create(ctx context.Context, customer Customer) (int64, error) Update(ctx context.Context, customer Customer) (bool, error) Delete(ctx context.Context, id int64) (bool, error) }
type Logger ¶
type Logger interface { WithFields(map[string]interface{}) Logger WithRequestId(context.Context) Logger Print(...interface{}) Debug(...interface{}) Info(...interface{}) Warn(...interface{}) Error(...interface{}) Fatal(...interface{}) Panic(...interface{}) Printf(string, ...interface{}) Debugf(string, ...interface{}) Infof(string, ...interface{}) Warnf(string, ...interface{}) Errorf(string, ...interface{}) Fatalf(string, ...interface{}) Panicf(string, ...interface{}) }
type LoggerFields ¶
type LoggerFields map[string]interface{}
type Seller ¶
type Seller struct { Id int64 `json:"id" bson:"_id" binding:"required"` Name string `json:"name" bson:"name" binding:"required"` Email string `json:"email" bson:"email" binding:"required,email"` }
func (*Seller) Merge ¶
func (s *Seller) Merge(updateSeller UpdateSeller)
type SellerRepository ¶
type SellerRepository interface { FindById(ctx context.Context, id int64) (*Seller, error) FindByName(ctx context.Context, name string) (*Seller, error) Create(ctx context.Context, seller Seller) (int64, error) Update(ctx context.Context, seller Seller) (bool, error) Delete(ctx context.Context, id int64) (bool, error) }
type UpdateCustomer ¶
type UpdateSeller ¶
Click to show internal directories.
Click to hide internal directories.