Documentation ¶
Index ¶
- func ValidateCreateRequest(dirtyData *OrderIncidentCreateRequestIDO) error
- func ValidateUpdateRequest(dirtyData *OrderIncidentUpdateRequestIDO) error
- type OrderIncidentController
- type OrderIncidentControllerImpl
- func (impl *OrderIncidentControllerImpl) ArchiveByID(ctx context.Context, id primitive.ObjectID) (*orderincident_s.OrderIncident, error)
- func (impl *OrderIncidentControllerImpl) Create(ctx context.Context, requestData *OrderIncidentCreateRequestIDO) (*orderincident_s.OrderIncident, error)
- func (impl *OrderIncidentControllerImpl) CreateAttachment(ctx context.Context, req *OrderIncidentOperationCreateAttachmentRequest) (*orderincident_s.OrderIncident, error)
- func (impl *OrderIncidentControllerImpl) CreateComment(ctx context.Context, req *OrderIncidentOperationCreateCommentRequest) (*orderincident_s.OrderIncident, error)
- func (impl *OrderIncidentControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl *OrderIncidentControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*orderincident_s.OrderIncident, error)
- func (c *OrderIncidentControllerImpl) ListAndCountByFilter(ctx context.Context, f *t_s.OrderIncidentPaginationListFilter) (*t_s.OrderIncidentPaginationListAndCountResult, error)
- func (c *OrderIncidentControllerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *orderincident_s.OrderIncidentListFilter) ([]*orderincident_s.OrderIncidentAsSelectOption, error)
- func (impl *OrderIncidentControllerImpl) UpdateByID(ctx context.Context, requestData *OrderIncidentUpdateRequestIDO) (*orderincident_s.OrderIncident, error)
- type OrderIncidentCreateRequestIDO
- type OrderIncidentOperationCreateAttachmentRequest
- type OrderIncidentOperationCreateCommentRequest
- type OrderIncidentUpdateRequestIDO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCreateRequest ¶
func ValidateCreateRequest(dirtyData *OrderIncidentCreateRequestIDO) error
func ValidateUpdateRequest ¶
func ValidateUpdateRequest(dirtyData *OrderIncidentUpdateRequestIDO) error
Types ¶
type OrderIncidentController ¶
type OrderIncidentController interface { Create(ctx context.Context, requestData *OrderIncidentCreateRequestIDO) (*orderincident_s.OrderIncident, error) GetByID(ctx context.Context, id primitive.ObjectID) (*orderincident_s.OrderIncident, error) UpdateByID(ctx context.Context, nu *OrderIncidentUpdateRequestIDO) (*orderincident_s.OrderIncident, error) ListAndCountByFilter(ctx context.Context, f *t_s.OrderIncidentPaginationListFilter) (*t_s.OrderIncidentPaginationListAndCountResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *orderincident_s.OrderIncidentListFilter) ([]*orderincident_s.OrderIncidentAsSelectOption, error) ArchiveByID(ctx context.Context, id primitive.ObjectID) (*orderincident_s.OrderIncident, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error CreateComment(ctx context.Context, req *OrderIncidentOperationCreateCommentRequest) (*orderincident_s.OrderIncident, error) CreateAttachment(ctx context.Context, req *OrderIncidentOperationCreateAttachmentRequest) (*orderincident_s.OrderIncident, error) }
OrderIncidentController Interface for orderincident business logic controller.
func NewController ¶
func NewController( appCfg *config.Conf, loggerp *slog.Logger, uuidp uuid.Provider, s3 s3_storage.S3Storager, passwordp password.Provider, kmux kmutex.Provider, client *mongo.Client, temailer templatedemailer.TemplatedEmailer, usr_storer user_s.UserStorer, t_storer t_s.OrderIncidentStorer, c_storer c_s.CustomerStorer, a_ctorer a_c.AssociateStorer, o_storer o_s.OrderStorer, ti_storer ti_s.TaskItemStorer, com_storer com_s.CommentStorer, attch_storer attachment_s.AttachmentStorer, ) OrderIncidentController
type OrderIncidentControllerImpl ¶
type OrderIncidentControllerImpl struct { Config *config.Conf Logger *slog.Logger UUID uuid.Provider S3 s3_storage.S3Storager Password password.Provider Kmutex kmutex.Provider DbClient *mongo.Client UserStorer user_s.UserStorer OrderIncidentStorer t_s.OrderIncidentStorer CustomerStorer c_s.CustomerStorer AssociateStorer a_c.AssociateStorer OrderStorer o_s.OrderStorer TaskItemStorer ti_s.TaskItemStorer CommentStorer com_s.CommentStorer AttachmentStorer attachment_s.AttachmentStorer TemplatedEmailer templatedemailer.TemplatedEmailer }
func (*OrderIncidentControllerImpl) ArchiveByID ¶
func (impl *OrderIncidentControllerImpl) ArchiveByID(ctx context.Context, id primitive.ObjectID) (*orderincident_s.OrderIncident, error)
func (*OrderIncidentControllerImpl) Create ¶
func (impl *OrderIncidentControllerImpl) Create(ctx context.Context, requestData *OrderIncidentCreateRequestIDO) (*orderincident_s.OrderIncident, error)
func (*OrderIncidentControllerImpl) CreateAttachment ¶
func (impl *OrderIncidentControllerImpl) CreateAttachment(ctx context.Context, req *OrderIncidentOperationCreateAttachmentRequest) (*orderincident_s.OrderIncident, error)
func (*OrderIncidentControllerImpl) CreateComment ¶
func (impl *OrderIncidentControllerImpl) CreateComment(ctx context.Context, req *OrderIncidentOperationCreateCommentRequest) (*orderincident_s.OrderIncident, error)
func (*OrderIncidentControllerImpl) DeleteByID ¶
func (*OrderIncidentControllerImpl) GetByID ¶
func (impl *OrderIncidentControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*orderincident_s.OrderIncident, error)
func (*OrderIncidentControllerImpl) ListAndCountByFilter ¶
func (c *OrderIncidentControllerImpl) ListAndCountByFilter(ctx context.Context, f *t_s.OrderIncidentPaginationListFilter) (*t_s.OrderIncidentPaginationListAndCountResult, error)
func (*OrderIncidentControllerImpl) ListAsSelectOptionByFilter ¶
func (c *OrderIncidentControllerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *orderincident_s.OrderIncidentListFilter) ([]*orderincident_s.OrderIncidentAsSelectOption, error)
func (*OrderIncidentControllerImpl) UpdateByID ¶
func (impl *OrderIncidentControllerImpl) UpdateByID(ctx context.Context, requestData *OrderIncidentUpdateRequestIDO) (*orderincident_s.OrderIncident, error)
type OrderIncidentCreateRequestIDO ¶
type OrderIncidentCreateRequestIDO struct { OrderID string `bson:"order_id" json:"order_id"` FormattedOrderID primitive.ObjectID `bson:"order_id"` FormattedOrderWJID uint64 `bson:"order_id"` StartDate time.Time `bson:"start_date" json:"start_date"` Initiator int8 `bson:"initiator" json:"initiator"` Title string `bson:"title" json:"title"` Description string `bson:"description" json:"description"` ClosingReason int8 `bson:"closing_reason" json:"closing_reason"` ClosingReasonOther string `bson:"closing_reason_other" json:"closing_reason_other"` }
type OrderIncidentUpdateRequestIDO ¶
type OrderIncidentUpdateRequestIDO struct { ID primitive.ObjectID `bson:"id" json:"id"` StartDate time.Time `bson:"start_date" json:"start_date"` Initiator int8 `bson:"initiator" json:"initiator"` Title string `bson:"title" json:"title"` Description string `bson:"description" json:"description"` ClosingReason int8 `bson:"closing_reason" json:"closing_reason"` ClosingReasonOther string `bson:"closing_reason_other" json:"closing_reason_other"` }
Click to show internal directories.
Click to hide internal directories.