Documentation ¶
Index ¶
- type StaffController
- type StaffControllerImpl
- func (impl *StaffControllerImpl) Archive(ctx context.Context, req *StaffOperationArchiveRequestIDO) (*a_s.Staff, error)
- func (impl *StaffControllerImpl) Avatar(ctx context.Context, req *StaffOperationAvatarRequest) (*c_s.Staff, error)
- func (impl *StaffControllerImpl) ChangePassword(ctx context.Context, req *StaffOperationChangePasswordRequest) error
- func (impl *StaffControllerImpl) ChangeTwoFactorAuthentication(ctx context.Context, req *StaffOperationChangeTwoFactorAuthenticationRequest) error
- func (impl *StaffControllerImpl) Create(ctx context.Context, req *StaffCreateRequestIDO) (*c_s.Staff, error)
- func (impl *StaffControllerImpl) CreateComment(ctx context.Context, req *StaffOperationCreateCommentRequest) (*c_s.Staff, error)
- func (impl *StaffControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl *StaffControllerImpl) Downgrade(ctx context.Context, req *StaffOperationDowngradeRequest) (*s_s.Staff, error)
- func (impl *StaffControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*a_c.Staff, error)
- func (c *StaffControllerImpl) LiteListAndCountByFilter(ctx context.Context, f *a_c.StaffPaginationListFilter) (*a_c.StaffPaginationLiteListAndCountResult, error)
- func (impl *StaffControllerImpl) UpdateByID(ctx context.Context, req *StaffUpdateRequestIDO) (*c_s.Staff, error)
- func (impl *StaffControllerImpl) Upgrade(ctx context.Context, req *StaffOperationUpgradeRequest) (*s_s.Staff, error)
- type StaffCreateRequestIDO
- type StaffOperationArchiveRequestIDO
- type StaffOperationAvatarRequest
- type StaffOperationChangePasswordRequest
- type StaffOperationChangeTwoFactorAuthenticationRequest
- type StaffOperationCreateCommentRequest
- type StaffOperationDowngradeRequest
- type StaffOperationUpgradeRequest
- type StaffUpdateRequestIDO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StaffController ¶
type StaffController interface { Create(ctx context.Context, m *StaffCreateRequestIDO) (*s_s.Staff, error) GetByID(ctx context.Context, id primitive.ObjectID) (*s_s.Staff, error) UpdateByID(ctx context.Context, req *StaffUpdateRequestIDO) (*s_s.Staff, error) LiteListAndCountByFilter(ctx context.Context, f *s_s.StaffPaginationListFilter) (*s_s.StaffPaginationLiteListAndCountResult, error) // ListAsSelectOptionByFilter(ctx context.Context, f *s_s.StaffListFilter) ([]*s_s.StaffAsSelectOption, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error CreateComment(ctx context.Context, req *StaffOperationCreateCommentRequest) (*s_s.Staff, error) Archive(ctx context.Context, req *StaffOperationArchiveRequestIDO) (*s_s.Staff, error) Downgrade(ctx context.Context, req *StaffOperationDowngradeRequest) (*s_s.Staff, error) Upgrade(ctx context.Context, req *StaffOperationUpgradeRequest) (*s_s.Staff, error) Avatar(ctx context.Context, req *StaffOperationAvatarRequest) (*s_s.Staff, error) ChangePassword(ctx context.Context, req *StaffOperationChangePasswordRequest) error ChangeTwoFactorAuthentication(ctx context.Context, req *StaffOperationChangeTwoFactorAuthenticationRequest) error }
StaffController Interface for staff 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, act_storer act_s.ActivitySheetStorer, task_storer task_s.TaskItemStorer, hh_storer hh_s.HowHearAboutUsItemStorer, skillset_s ss_s.SkillSetStorer, vehicletype_s vt_s.VehicleTypeStorer, servicefee_s servicefee_s.ServiceFeeStorer, insurancerequirement_s ir_s.InsuranceRequirementStorer, usr_storer user_s.UserStorer, t_storer t_s.TagStorer, ord_s o_s.OrderStorer, attch_storer attachment_s.AttachmentStorer, s_storer s_s.StaffStorer, ) StaffController
type StaffControllerImpl ¶
type StaffControllerImpl 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 ActivitySheetStorer act_s.ActivitySheetStorer TaskItemStorer task_s.TaskItemStorer HowHearStorer hh_s.HowHearAboutUsItemStorer SkillSetStorer ss_s.SkillSetStorer VehicleTypeStorer vt_s.VehicleTypeStorer TagStorer t_s.TagStorer ServiceFeeStorer servicefee_s.ServiceFeeStorer InsuranceRequirementStorer ir_s.InsuranceRequirementStorer OrderStorer o_s.OrderStorer AttachmentStorer attachment_s.AttachmentStorer UserStorer user_s.UserStorer StaffStorer s_s.StaffStorer }
func (*StaffControllerImpl) Archive ¶
func (impl *StaffControllerImpl) Archive(ctx context.Context, req *StaffOperationArchiveRequestIDO) (*a_s.Staff, error)
func (*StaffControllerImpl) Avatar ¶
func (impl *StaffControllerImpl) Avatar(ctx context.Context, req *StaffOperationAvatarRequest) (*c_s.Staff, error)
func (*StaffControllerImpl) ChangePassword ¶
func (impl *StaffControllerImpl) ChangePassword(ctx context.Context, req *StaffOperationChangePasswordRequest) error
func (*StaffControllerImpl) ChangeTwoFactorAuthentication ¶
func (impl *StaffControllerImpl) ChangeTwoFactorAuthentication(ctx context.Context, req *StaffOperationChangeTwoFactorAuthenticationRequest) error
func (*StaffControllerImpl) Create ¶
func (impl *StaffControllerImpl) Create(ctx context.Context, req *StaffCreateRequestIDO) (*c_s.Staff, error)
func (*StaffControllerImpl) CreateComment ¶
func (impl *StaffControllerImpl) CreateComment(ctx context.Context, req *StaffOperationCreateCommentRequest) (*c_s.Staff, error)
func (*StaffControllerImpl) DeleteByID ¶
func (*StaffControllerImpl) Downgrade ¶
func (impl *StaffControllerImpl) Downgrade(ctx context.Context, req *StaffOperationDowngradeRequest) (*s_s.Staff, error)
func (*StaffControllerImpl) LiteListAndCountByFilter ¶
func (c *StaffControllerImpl) LiteListAndCountByFilter(ctx context.Context, f *a_c.StaffPaginationListFilter) (*a_c.StaffPaginationLiteListAndCountResult, error)
func (*StaffControllerImpl) UpdateByID ¶
func (impl *StaffControllerImpl) UpdateByID(ctx context.Context, req *StaffUpdateRequestIDO) (*c_s.Staff, error)
func (*StaffControllerImpl) Upgrade ¶
func (impl *StaffControllerImpl) Upgrade(ctx context.Context, req *StaffOperationUpgradeRequest) (*s_s.Staff, error)
type StaffCreateRequestIDO ¶
type StaffCreateRequestIDO struct { Type int8 `json:"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"` VehicleTypes []primitive.ObjectID `bson:"vehicle_types" json:"vehicle_types,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"` Description string `bson:"description" json:"description"` LimitSpecial string `bson:"limit_special" json:"limit_special"` PoliceCheck string `bson:"police_check" json:"police_check"` PoliceCheckDT time.Time `json:"-"` DriversLicenseClass string `bson:"drivers_license_class" json:"drivers_license_class"` PreferredLanguage string `bson:"preferred_language" json:"preferred_language"` EmergencyContactName string `bson:"emergency_contact_name" json:"emergency_contact_name"` EmergencyContactRelationship string `bson:"emergency_contact_relationship" json:"emergency_contact_relationship"` EmergencyContactTelephone string `bson:"emergency_contact_telephone" json:"emergency_contact_telephone"` EmergencyContactAlternativeTelephone string `bson:"emergency_contact_alternative_telephone" json:"emergency_contact_alternative_telephone"` IdentifyAs []int8 `bson:"identify_as" json:"identify_as,omitempty"` Password string `bson:"password" json:"password"` PasswordRepeated string `bson:"password_repeated" json:"password_repeated"` }
type StaffUpdateRequestIDO ¶
type StaffUpdateRequestIDO struct { ID primitive.ObjectID `json:"id,omitempty"` Type int8 `json:"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"` VehicleTypes []primitive.ObjectID `bson:"vehicle_types" json:"vehicle_types,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"` LimitSpecial string `bson:"limit_special" json:"limit_special"` PoliceCheck string `bson:"police_check" json:"police_check"` PoliceCheckDT time.Time `json:"-"` DriversLicenseClass string `bson:"drivers_license_class" json:"drivers_license_class"` PreferredLanguage string `bson:"preferred_language" json:"preferred_language"` EmergencyContactName string `bson:"emergency_contact_name" json:"emergency_contact_name"` EmergencyContactRelationship string `bson:"emergency_contact_relationship" json:"emergency_contact_relationship"` EmergencyContactTelephone string `bson:"emergency_contact_telephone" json:"emergency_contact_telephone"` EmergencyContactAlternativeTelephone string `bson:"emergency_contact_alternative_telephone" json:"emergency_contact_alternative_telephone"` IdentifyAs []int8 `bson:"identify_as" json:"identify_as,omitempty"` Description string `bson:"description" json:"description"` }
Click to show internal directories.
Click to hide internal directories.