Documentation
¶
Index ¶
- func GetDateTime(date string) (start primitive.DateTime, end primitive.DateTime)
- func GetPayment(payment string) (pay primitive.E)
- type AudienceService
- func (s *AudienceService) DeleteAllAudiences(ctx context.Context, userID primitive.ObjectID) (err error)
- func (s *AudienceService) DeleteAudience(ctx context.Context, userID primitive.ObjectID, audID primitive.ObjectID) (err error)
- func (s *AudienceService) GetAllAudiences(ctx context.Context, userID primitive.ObjectID) (auds []types.Audience, err error)
- func (s *AudienceService) GetAudienceByID(ctx context.Context, userID primitive.ObjectID, audID primitive.ObjectID) (aud types.Audience, err error)
- func (s *AudienceService) InsertAudience(ctx context.Context, aud types.Audience) (insertedAud types.Audience, err error)
- func (s *AudienceService) UpdateAudience(ctx context.Context, update types.Audience) (aud types.Audience, err error)
- type GoodsService
- func (s *GoodsService) DeleteAllGoods(ctx context.Context, userID primitive.ObjectID) (err error)
- func (s *GoodsService) DeleteGood(ctx context.Context, userID primitive.ObjectID, goodID primitive.ObjectID) (err error)
- func (s *GoodsService) GetAllGoods(ctx context.Context, userID primitive.ObjectID) (goods []types.Good, err error)
- func (s *GoodsService) GetGoodByID(ctx context.Context, userID primitive.ObjectID, goodID primitive.ObjectID) (good types.Good, err error)
- func (s *GoodsService) InsertGood(ctx context.Context, good types.Good) (insertedGood types.Good, err error)
- func (s *GoodsService) UpdateGood(ctx context.Context, userID primitive.ObjectID, goodID primitive.ObjectID, ...) (good types.Good, err error)
- type ProductionService
- func (s *ProductionService) DeleteAllProductions(ctx context.Context, userID primitive.ObjectID) (err error)
- func (s *ProductionService) DeleteProduction(ctx context.Context, prodID primitive.ObjectID, userID primitive.ObjectID) (err error)
- func (s *ProductionService) GetAllProductions(ctx context.Context, userID primitive.ObjectID) (productions []types.Production, err error)
- func (s *ProductionService) GetProductionByID(ctx context.Context, prodID primitive.ObjectID, userID primitive.ObjectID) (production types.Production, err error)
- func (s *ProductionService) InsertProduction(ctx context.Context, production types.Production, userID primitive.ObjectID) (insertedProduction types.Production, err error)
- type ReportsService
- func (s *ReportsService) GetProductionReportPerDate(ctx context.Context, userID primitive.ObjectID, goodID primitive.ObjectID, ...) (reports []types.ProductionReport, ...)
- func (s *ReportsService) GetReportPerDate(ctx context.Context, userID primitive.ObjectID, goodID primitive.ObjectID, ...) (reports []types.TransactionReport, err error)
- type Service
- type TransactionService
- func (s *TransactionService) DeleteAllTransactions(ctx context.Context, userID primitive.ObjectID, ...) error
- func (s *TransactionService) DeleteTransaction(ctx context.Context, userID primitive.ObjectID, transID primitive.ObjectID) error
- func (s *TransactionService) GetAllTransactions(ctx context.Context, userID primitive.ObjectID) (transactions []types.Transaction, err error)
- func (s *TransactionService) GetAudience(audience string, userID primitive.ObjectID, typee types.TransactionType) (aud primitive.E)
- func (s *TransactionService) GetBoughtTransactions(ctx context.Context, userID primitive.ObjectID) (transactions []types.Transaction, err error)
- func (s *TransactionService) GetGood(good string, userID primitive.ObjectID) (g primitive.E)
- func (s *TransactionService) GetSoldTransactions(ctx context.Context, userID primitive.ObjectID) (transactions []types.Transaction, err error)
- func (s *TransactionService) GetTransactionByID(ctx context.Context, transID primitive.ObjectID, userID primitive.ObjectID) (transaction types.Transaction, err error)
- func (s *TransactionService) InsertTransaction(ctx context.Context, trans types.Transaction) (insertedTrans types.Transaction, err error)
- func (s *TransactionService) UpdateTransaction(ctx context.Context, userID primitive.ObjectID, transID primitive.ObjectID, ...) (types.Transaction, error)
- type UserService
- func (s *UserService) DeleteUser(ctx context.Context, id primitive.ObjectID) error
- func (s *UserService) GetUserByEmail(ctx context.Context, email string) error
- func (s *UserService) GetUserByID(ctx context.Context, id primitive.ObjectID) (User types.User, error error)
- func (s *UserService) GetUserByUsername(ctx context.Context, username string) (User types.User, error error)
- func (s *UserService) InsertUser(ctx context.Context, name string, email string, password string) (User types.User, error error)
- func (s *UserService) LoginUser(ctx context.Context, email_username string, password string) (User types.User, error error)
- func (s *UserService) UpdateUser(ctx context.Context, updateUser types.User) (User types.User, error error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPayment ¶
Types ¶
type AudienceService ¶
type AudienceService struct {
// contains filtered or unexported fields
}
func (*AudienceService) DeleteAllAudiences ¶
func (*AudienceService) DeleteAudience ¶
func (*AudienceService) GetAllAudiences ¶
func (*AudienceService) GetAudienceByID ¶
func (*AudienceService) InsertAudience ¶
func (*AudienceService) UpdateAudience ¶
type GoodsService ¶
type GoodsService struct {
// contains filtered or unexported fields
}
func (*GoodsService) DeleteAllGoods ¶
func (*GoodsService) DeleteGood ¶
func (*GoodsService) GetAllGoods ¶
func (*GoodsService) GetGoodByID ¶
func (*GoodsService) InsertGood ¶
func (*GoodsService) UpdateGood ¶
type ProductionService ¶
type ProductionService struct {
// contains filtered or unexported fields
}
func (*ProductionService) DeleteAllProductions ¶
func (*ProductionService) DeleteProduction ¶
func (*ProductionService) GetAllProductions ¶
func (s *ProductionService) GetAllProductions(ctx context.Context, userID primitive.ObjectID) (productions []types.Production, err error)
func (*ProductionService) GetProductionByID ¶
func (s *ProductionService) GetProductionByID(ctx context.Context, prodID primitive.ObjectID, userID primitive.ObjectID) (production types.Production, err error)
func (*ProductionService) InsertProduction ¶
func (s *ProductionService) InsertProduction(ctx context.Context, production types.Production, userID primitive.ObjectID) (insertedProduction types.Production, err error)
type ReportsService ¶
type ReportsService struct {
// contains filtered or unexported fields
}
func (*ReportsService) GetProductionReportPerDate ¶
type Service ¶
type Service struct { Collections *db.Collections UserService *UserService AudienceService *AudienceService GoodsService *GoodsService TransactionService *TransactionService ProductionService *ProductionService ReportsService *ReportsService // contains filtered or unexported fields }
type TransactionService ¶
type TransactionService struct {
// contains filtered or unexported fields
}
func (*TransactionService) DeleteAllTransactions ¶
func (s *TransactionService) DeleteAllTransactions(ctx context.Context, userID primitive.ObjectID, transType types.TransactionType) error
func (*TransactionService) DeleteTransaction ¶
func (*TransactionService) GetAllTransactions ¶
func (s *TransactionService) GetAllTransactions(ctx context.Context, userID primitive.ObjectID) (transactions []types.Transaction, err error)
func (*TransactionService) GetAudience ¶
func (s *TransactionService) GetAudience(audience string, userID primitive.ObjectID, typee types.TransactionType) (aud primitive.E)
func (*TransactionService) GetBoughtTransactions ¶
func (s *TransactionService) GetBoughtTransactions(ctx context.Context, userID primitive.ObjectID) (transactions []types.Transaction, err error)
func (*TransactionService) GetSoldTransactions ¶
func (s *TransactionService) GetSoldTransactions(ctx context.Context, userID primitive.ObjectID) (transactions []types.Transaction, err error)
func (*TransactionService) GetTransactionByID ¶
func (s *TransactionService) GetTransactionByID(ctx context.Context, transID primitive.ObjectID, userID primitive.ObjectID) (transaction types.Transaction, err error)
func (*TransactionService) InsertTransaction ¶
func (s *TransactionService) InsertTransaction(ctx context.Context, trans types.Transaction) (insertedTrans types.Transaction, err error)
func (*TransactionService) UpdateTransaction ¶
func (s *TransactionService) UpdateTransaction(ctx context.Context, userID primitive.ObjectID, transID primitive.ObjectID, trans types.Transaction) (types.Transaction, error)
type UserService ¶
func (*UserService) DeleteUser ¶
func (*UserService) GetUserByEmail ¶
func (s *UserService) GetUserByEmail(ctx context.Context, email string) error
func (*UserService) GetUserByID ¶
func (*UserService) GetUserByUsername ¶
func (*UserService) InsertUser ¶
func (*UserService) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.