Documentation ¶
Index ¶
- type CustomerController
- type CustomerControllerImpl
- func (impl *CustomerControllerImpl) ArchiveByID(ctx context.Context, id primitive.ObjectID) (*user_s.User, error)
- func (impl *CustomerControllerImpl) Create(ctx context.Context, requestData *CustomerCreateRequestIDO) (*user_s.User, error)
- func (impl *CustomerControllerImpl) CreateComment(ctx context.Context, customerID primitive.ObjectID, content string) (*user_s.User, error)
- func (impl *CustomerControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (c *CustomerControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*user_s.User, error)
- func (c *CustomerControllerImpl) ListByFilter(ctx context.Context, f *user_s.UserPaginationListFilter) (*user_s.UserPaginationListResult, error)
- func (impl *CustomerControllerImpl) Star(ctx context.Context, id primitive.ObjectID) (*user_s.User, error)
- func (impl *CustomerControllerImpl) UpdateByID(ctx context.Context, nu *user_s.User) (*user_s.User, error)
- type CustomerCreateRequestIDO
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) (*user_s.User, error) GetByID(ctx context.Context, id primitive.ObjectID) (*user_s.User, error) UpdateByID(ctx context.Context, m *user_s.User) (*user_s.User, error) ListByFilter(ctx context.Context, f *user_s.UserPaginationListFilter) (*user_s.UserPaginationListResult, error) ArchiveByID(ctx context.Context, id primitive.ObjectID) (*user_s.User, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error CreateComment(ctx context.Context, customerID primitive.ObjectID, content string) (*user_s.User, error) Star(ctx context.Context, id primitive.ObjectID) (*user_s.User, 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, paymentProcessor pm.PaymentProcessor, cbffb pdfbuilder.CBFFBuilder, temailer templatedemailer.TemplatedEmailer, client *mongo.Client, u_storer user_s.UserStorer, sub_storer submission_s.ComicSubmissionStorer, ) CustomerController
type CustomerControllerImpl ¶
type CustomerControllerImpl struct { Config *config.Conf Logger *slog.Logger UUID uuid.Provider S3 s3_storage.S3Storager Password password.Provider PaymentProcessor pm.PaymentProcessor CBFFBuilder pdfbuilder.CBFFBuilder DbClient *mongo.Client UserStorer user_s.UserStorer ComicSubmissionStorer submission_s.ComicSubmissionStorer TemplatedEmailer templatedemailer.TemplatedEmailer }
func (*CustomerControllerImpl) ArchiveByID ¶
func (*CustomerControllerImpl) Create ¶
func (impl *CustomerControllerImpl) Create(ctx context.Context, requestData *CustomerCreateRequestIDO) (*user_s.User, error)
func (*CustomerControllerImpl) CreateComment ¶
func (*CustomerControllerImpl) DeleteByID ¶
func (*CustomerControllerImpl) ListByFilter ¶
func (c *CustomerControllerImpl) ListByFilter(ctx context.Context, f *user_s.UserPaginationListFilter) (*user_s.UserPaginationListResult, error)
func (*CustomerControllerImpl) Star ¶
func (impl *CustomerControllerImpl) Star(ctx context.Context, id primitive.ObjectID) (*user_s.User, error)
Star function will either set this user's `is_starred` to `true` or `false` depending if it was previously starred.
func (*CustomerControllerImpl) UpdateByID ¶
type CustomerCreateRequestIDO ¶
type CustomerCreateRequestIDO struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Phone string `json:"phone,omitempty"` 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"` HowDidYouHearAboutUs int8 `json:"how_did_you_hear_about_us,omitempty"` HowDidYouHearAboutUsOther string `json:"how_did_you_hear_about_us_other,omitempty"` HowLongStoreOperating int8 `bson:"how_long_store_operating" json:"how_long_store_operating,omitempty"` AgreeTOS bool `json:"agree_tos,omitempty"` AgreePromotionsEmail bool `json:"agree_promotions_email,omitempty"` HasShippingAddress bool `bson:"has_shipping_address" json:"has_shipping_address,omitempty"` ShippingName string `bson:"shipping_name" json:"shipping_name,omitempty"` ShippingPhone string `bson:"shipping_phone" json:"shipping_phone,omitempty"` ShippingCountry string `bson:"shipping_country" json:"shipping_country,omitempty"` ShippingRegion string `bson:"shipping_region" json:"shipping_region,omitempty"` ShippingCity string `bson:"shipping_city" json:"shipping_city,omitempty"` ShippingPostalCode string `bson:"shipping_postal_code" json:"shipping_postal_code,omitempty"` ShippingAddressLine1 string `bson:"shipping_address_line1" json:"shipping_address_line1,omitempty"` ShippingAddressLine2 string `bson:"shipping_address_line2" json:"shipping_address_line2,omitempty"` HowLongCollectingComicBooksForGrading int8 `bson:"how_long_collecting_comic_books_for_grading" json:"how_long_collecting_comic_books_for_grading"` HasPreviouslySubmittedComicBookForGrading int8 `bson:"has_previously_submitted_comic_book_for_grading" json:"has_previously_submitted_comic_book_for_grading"` HasOwnedGradedComicBooks int8 `bson:"has_owned_graded_comic_books" json:"has_owned_graded_comic_books"` HasRegularComicBookShop int8 `bson:"has_regular_comic_book_shop" json:"has_regular_comic_book_shop"` HasPreviouslyPurchasedFromAuctionSite int8 `bson:"has_previously_purchased_from_auction_site" json:"has_previously_purchased_from_auction_site"` HasPreviouslyPurchasedFromFacebookMarketplace int8 `bson:"has_previously_purchased_from_facebook_marketplace" json:"has_previously_purchased_from_facebook_marketplace"` HasRegularlyAttendedComicConsOrCollectibleShows int8 `bson:"has_regularly_attended_comic_cons_or_collectible_shows" json:"has_regularly_attended_comic_cons_or_collectible_shows"` }
Click to show internal directories.
Click to hide internal directories.