Documentation ¶
Index ¶
- type CustomerController
- type CustomerControllerImpl
- func (impl *CustomerControllerImpl) Archive(ctx context.Context, req *CustomerOperationArchiveRequestIDO) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) Avatar(ctx context.Context, req *CustomerOperationAvatarRequest) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) Ban(ctx context.Context, req *CustomerOperationBanRequest) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) ChangePassword(ctx context.Context, req *CustomerOperationChangePasswordRequest) error
- func (impl *CustomerControllerImpl) ChangeTwoFactorAuthentication(ctx context.Context, ...) error
- func (impl *CustomerControllerImpl) Create(ctx context.Context, req *CustomerCreateRequestIDO) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) CreateComment(ctx context.Context, req *CustomerOperationCreateCommentRequest) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl *CustomerControllerImpl) Downgrade(ctx context.Context, req *CustomerOperationDowngradeRequest) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*c_s.Customer, error)
- func (c *CustomerControllerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *c_s.CustomerListFilter) ([]*c_s.CustomerAsSelectOption, error)
- func (c *CustomerControllerImpl) LiteListAndCountByFilter(ctx context.Context, f *c_s.CustomerPaginationListFilter) (*c_s.CustomerPaginationLiteListAndCountResult, error)
- func (impl *CustomerControllerImpl) Unban(ctx context.Context, req *CustomerOperationUnbanRequest) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) UpdateByID(ctx context.Context, req *CustomerUpdateRequestIDO) (*c_s.Customer, error)
- func (impl *CustomerControllerImpl) UpdateRelatedByOrders(sessCtx mongo.SessionContext, cust *c_s.Customer) error
- func (impl *CustomerControllerImpl) UpdateRelatedByTags(sessCtx mongo.SessionContext, cust *c_s.Customer, ...) error
- func (impl *CustomerControllerImpl) UpdateRelatedByTaskItems(sessCtx mongo.SessionContext, cust *c_s.Customer) error
- func (impl *CustomerControllerImpl) UpdateRelatedByUser(sessCtx mongo.SessionContext, cust *c_s.Customer) error
- func (impl *CustomerControllerImpl) Upgrade(ctx context.Context, req *CustomerOperationUpgradeRequest) (*c_s.Customer, error)
- type CustomerCreateRequestIDO
- type CustomerOperationArchiveRequestIDO
- type CustomerOperationAvatarRequest
- type CustomerOperationBanRequest
- type CustomerOperationChangePasswordRequest
- type CustomerOperationChangeTwoFactorAuthenticationRequest
- type CustomerOperationCreateCommentRequest
- type CustomerOperationDowngradeRequest
- type CustomerOperationUnbanRequest
- type CustomerOperationUpgradeRequest
- type CustomerUpdateRequestIDO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomerController ¶
type CustomerController interface { Create(ctx context.Context, m *CustomerCreateRequestIDO) (*c_s.Customer, error) GetByID(ctx context.Context, id primitive.ObjectID) (*c_s.Customer, error) UpdateByID(ctx context.Context, req *CustomerUpdateRequestIDO) (*c_s.Customer, error) LiteListAndCountByFilter(ctx context.Context, f *c_s.CustomerPaginationListFilter) (*c_s.CustomerPaginationLiteListAndCountResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *c_s.CustomerListFilter) ([]*c_s.CustomerAsSelectOption, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error CreateComment(ctx context.Context, req *CustomerOperationCreateCommentRequest) (*c_s.Customer, error) Archive(ctx context.Context, req *CustomerOperationArchiveRequestIDO) (*c_s.Customer, error) Downgrade(ctx context.Context, req *CustomerOperationDowngradeRequest) (*c_s.Customer, error) Upgrade(ctx context.Context, req *CustomerOperationUpgradeRequest) (*c_s.Customer, error) Avatar(ctx context.Context, req *CustomerOperationAvatarRequest) (*c_s.Customer, error) ChangePassword(ctx context.Context, req *CustomerOperationChangePasswordRequest) error ChangeTwoFactorAuthentication(ctx context.Context, req *CustomerOperationChangeTwoFactorAuthenticationRequest) error Ban(ctx context.Context, req *CustomerOperationBanRequest) (*c_s.Customer, error) Unban(ctx context.Context, req *CustomerOperationUnbanRequest) (*c_s.Customer, error) }
CustomerController Interface for customer 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, temailer templatedemailer.TemplatedEmailer, client *mongo.Client, org_storer ten_s.TenantStorer, com_storer com_s.CommentStorer, hh_storer hh_s.HowHearAboutUsItemStorer, t_storer t_s.TagStorer, usr_storer user_s.UserStorer, attch_storer attachment_s.AttachmentStorer, c_storer c_s.CustomerStorer, o_storer o_s.OrderStorer, ti_storer ti_s.TaskItemStorer, ) CustomerController
type CustomerControllerImpl ¶
type CustomerControllerImpl struct { Config *config.Conf Logger *slog.Logger UUID uuid.Provider S3 s3_storage.S3Storager Password password.Provider Kmutex kmutex.Provider TemplatedEmailer templatedemailer.TemplatedEmailer DbClient *mongo.Client TenantStorer ten_s.TenantStorer CommentStorer com_s.CommentStorer HowHearStorer hh_s.HowHearAboutUsItemStorer TagStorer t_s.TagStorer UserStorer user_s.UserStorer AttachmentStorer attachment_s.AttachmentStorer CustomerStorer c_s.CustomerStorer OrderStorer o_s.OrderStorer TaskItemStorer ti_s.TaskItemStorer }
func (*CustomerControllerImpl) Archive ¶
func (impl *CustomerControllerImpl) Archive(ctx context.Context, req *CustomerOperationArchiveRequestIDO) (*c_s.Customer, error)
func (*CustomerControllerImpl) Avatar ¶
func (impl *CustomerControllerImpl) Avatar(ctx context.Context, req *CustomerOperationAvatarRequest) (*c_s.Customer, error)
func (*CustomerControllerImpl) Ban ¶
func (impl *CustomerControllerImpl) Ban(ctx context.Context, req *CustomerOperationBanRequest) (*c_s.Customer, error)
func (*CustomerControllerImpl) ChangePassword ¶
func (impl *CustomerControllerImpl) ChangePassword(ctx context.Context, req *CustomerOperationChangePasswordRequest) error
func (*CustomerControllerImpl) ChangeTwoFactorAuthentication ¶
func (impl *CustomerControllerImpl) ChangeTwoFactorAuthentication(ctx context.Context, req *CustomerOperationChangeTwoFactorAuthenticationRequest) error
func (*CustomerControllerImpl) Create ¶
func (impl *CustomerControllerImpl) Create(ctx context.Context, req *CustomerCreateRequestIDO) (*c_s.Customer, error)
func (*CustomerControllerImpl) CreateComment ¶
func (impl *CustomerControllerImpl) CreateComment(ctx context.Context, req *CustomerOperationCreateCommentRequest) (*c_s.Customer, error)
func (*CustomerControllerImpl) DeleteByID ¶
func (*CustomerControllerImpl) Downgrade ¶
func (impl *CustomerControllerImpl) Downgrade(ctx context.Context, req *CustomerOperationDowngradeRequest) (*c_s.Customer, error)
func (*CustomerControllerImpl) ListAsSelectOptionByFilter ¶
func (c *CustomerControllerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *c_s.CustomerListFilter) ([]*c_s.CustomerAsSelectOption, error)
func (*CustomerControllerImpl) LiteListAndCountByFilter ¶
func (c *CustomerControllerImpl) LiteListAndCountByFilter(ctx context.Context, f *c_s.CustomerPaginationListFilter) (*c_s.CustomerPaginationLiteListAndCountResult, error)
func (*CustomerControllerImpl) Unban ¶
func (impl *CustomerControllerImpl) Unban(ctx context.Context, req *CustomerOperationUnbanRequest) (*c_s.Customer, error)
func (*CustomerControllerImpl) UpdateByID ¶
func (impl *CustomerControllerImpl) UpdateByID(ctx context.Context, req *CustomerUpdateRequestIDO) (*c_s.Customer, error)
func (*CustomerControllerImpl) UpdateRelatedByOrders ¶
func (impl *CustomerControllerImpl) UpdateRelatedByOrders(sessCtx mongo.SessionContext, cust *c_s.Customer) error
UpdateRelatedByOrders function will take the inputted `order` with the customer.
func (*CustomerControllerImpl) UpdateRelatedByTags ¶
func (impl *CustomerControllerImpl) UpdateRelatedByTags(sessCtx mongo.SessionContext, cust *c_s.Customer, modifiedTIDs []primitive.ObjectID) error
UpdateRelatedByTags function will take the inputted `tags` with the customer.
func (*CustomerControllerImpl) UpdateRelatedByTaskItems ¶
func (impl *CustomerControllerImpl) UpdateRelatedByTaskItems(sessCtx mongo.SessionContext, cust *c_s.Customer) error
UpdateRelatedByTaskItems function will take the inputted `TaskItem` with the customer.
func (*CustomerControllerImpl) UpdateRelatedByUser ¶
func (impl *CustomerControllerImpl) UpdateRelatedByUser(sessCtx mongo.SessionContext, cust *c_s.Customer) error
UpdateRelatedByUser function will update the user account.
func (*CustomerControllerImpl) Upgrade ¶
func (impl *CustomerControllerImpl) Upgrade(ctx context.Context, req *CustomerOperationUpgradeRequest) (*c_s.Customer, error)
type CustomerCreateRequestIDO ¶
type CustomerCreateRequestIDO struct { Type int8 `json:"type"` OrganizationName string `json:"organization_name"` OrganizationType int8 `json:"organization_type"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` IsOkToEmail bool `json:"is_ok_to_email"` Phone string `json:"phone,omitempty"` PhoneType int8 `json:"phone_type"` PhoneExtension string `json:"phone_extension"` IsOkToText bool `json:"is_ok_to_text"` OtherPhone string `json:"other_phone"` OtherPhoneType int8 `json:"other_phone_type"` OtherPhoneExtension string `json:"other_phone_extension"` Country string `json:"country,omitempty"` Region string `json:"region,omitempty"` City string `json:"city,omitempty"` PostalCode string `json:"postal_code,omitempty"` AddressLine1 string `json:"address_line1,omitempty"` AddressLine2 string `json:"address_line2,omitempty"` HasShippingAddress bool `json:"has_shipping_address,omitempty"` ShippingName string `json:"shipping_name,omitempty"` ShippingPhone string `json:"shipping_phone,omitempty"` ShippingCountry string `json:"shipping_country,omitempty"` ShippingRegion string `json:"shipping_region,omitempty"` ShippingCity string `json:"shipping_city,omitempty"` ShippingPostalCode string `json:"shipping_postal_code,omitempty"` ShippingAddressLine1 string `json:"shipping_address_line1,omitempty"` ShippingAddressLine2 string `json:"shipping_address_line2,omitempty"` Tags []primitive.ObjectID `json:"tags,omitempty"` HowDidYouHearAboutUsID primitive.ObjectID `json:"how_did_you_hear_about_us_id,omitempty"` IsHowDidYouHearAboutUsOther bool `json:"is_how_did_you_hear_about_us_other,omitempty"` HowDidYouHearAboutUsOther string `json:"how_did_you_hear_about_us_other,omitempty"` BirthDate string `json:"birth_date"` BirthDateDT time.Time `json:"-"` JoinDate string `json:"join_date"` JoinDateDT time.Time `json:"-"` Gender int8 `bson:"gender" json:"gender"` GenderOther string `bson:"gender_other" json:"gender_other"` AdditionalComment string `json:"additional_comment"` PreferredLanguage string `bson:"preferred_language" json:"preferred_language"` Password string `bson:"password" json:"password"` PasswordRepeated string `bson:"password_repeated" json:"password_repeated"` }
type CustomerUpdateRequestIDO ¶
type CustomerUpdateRequestIDO struct { ID primitive.ObjectID `json:"id,omitempty"` Type int8 `json:"type"` OrganizationName string `json:"organization_name"` OrganizationType int8 `json:"organization_type"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` IsOkToEmail bool `json:"is_ok_to_email"` Phone string `json:"phone,omitempty"` PhoneType int8 `json:"phone_type"` PhoneExtension string `json:"phone_extension"` IsOkToText bool `json:"is_ok_to_text"` OtherPhone string `json:"other_phone"` OtherPhoneExtension string `json:"other_phone_extension"` OtherPhoneType int8 `json:"other_phone_type"` Country string `json:"country,omitempty"` Region string `json:"region,omitempty"` City string `json:"city,omitempty"` PostalCode string `json:"postal_code,omitempty"` AddressLine1 string `json:"address_line1,omitempty"` AddressLine2 string `json:"address_line2,omitempty"` HasShippingAddress bool `json:"has_shipping_address,omitempty"` ShippingName string `json:"shipping_name,omitempty"` ShippingPhone string `json:"shipping_phone,omitempty"` ShippingCountry string `json:"shipping_country,omitempty"` ShippingRegion string `json:"shipping_region,omitempty"` ShippingCity string `json:"shipping_city,omitempty"` ShippingPostalCode string `json:"shipping_postal_code,omitempty"` ShippingAddressLine1 string `json:"shipping_address_line1,omitempty"` ShippingAddressLine2 string `json:"shipping_address_line2,omitempty"` Tags []primitive.ObjectID `json:"tags,omitempty"` HowDidYouHearAboutUsID primitive.ObjectID `json:"how_did_you_hear_about_us_id,omitempty"` IsHowDidYouHearAboutUsOther bool `json:"is_how_did_you_hear_about_us_other,omitempty"` HowDidYouHearAboutUsOther string `json:"how_did_you_hear_about_us_other,omitempty"` BirthDate string `json:"birth_date"` BirthDateDT time.Time `json:"-"` JoinDate string `json:"join_date"` JoinDateDT time.Time `json:"-"` Gender int8 `bson:"gender" json:"gender"` GenderOther string `bson:"gender_other" json:"gender_other"` PreferredLanguage string `bson:"preferred_language" json:"preferred_language"` }
Click to show internal directories.
Click to hide internal directories.