Documentation ¶
Index ¶
- Constants
- type InsuranceRequirement
- type InsuranceRequirementAsSelectOption
- type InsuranceRequirementListFilter
- type InsuranceRequirementListResult
- type InsuranceRequirementPaginationListAndCountResult
- type InsuranceRequirementPaginationListFilter
- type InsuranceRequirementPaginationListResult
- type InsuranceRequirementStorer
- type InsuranceRequirementStorerImpl
- func (impl InsuranceRequirementStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl InsuranceRequirementStorerImpl) CountByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (int64, error)
- func (impl InsuranceRequirementStorerImpl) Create(ctx context.Context, u *InsuranceRequirement) error
- func (impl InsuranceRequirementStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl InsuranceRequirementStorerImpl) GetByEmail(ctx context.Context, email string) (*InsuranceRequirement, error)
- func (impl InsuranceRequirementStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*InsuranceRequirement, error)
- func (impl InsuranceRequirementStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*InsuranceRequirement, error)
- func (impl InsuranceRequirementStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*InsuranceRequirement, error)
- func (impl InsuranceRequirementStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*InsuranceRequirement, error)
- func (c *InsuranceRequirementStorerImpl) ListAndCountByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (*InsuranceRequirementPaginationListAndCountResult, error)
- func (impl InsuranceRequirementStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) ([]*InsuranceRequirementAsSelectOption, error)
- func (impl InsuranceRequirementStorerImpl) ListByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (*InsuranceRequirementPaginationListResult, error)
- func (impl InsuranceRequirementStorerImpl) UpdateByID(ctx context.Context, m *InsuranceRequirement) error
Constants ¶
View Source
const ( StatusActive = 1 StatusArchived = 2 )
View Source
const ( OrderAscending = 1 OrderDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsuranceRequirement ¶
type InsuranceRequirement struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Status int8 `bson:"status" json:"status"` PublicID uint64 `bson:"public_id" json:"public_id"` CreatedAt time.Time `bson:"created_at" json:"created_at"` CreatedByUserID primitive.ObjectID `bson:"created_by_user_id" json:"created_by_user_id,omitempty"` CreatedByUserName string `bson:"created_by_user_name" json:"created_by_user_name"` CreatedFromIPAddress string `bson:"created_from_ip_address" json:"created_from_ip_address"` ModifiedAt time.Time `bson:"modified_at" json:"modified_at"` ModifiedByUserID primitive.ObjectID `bson:"modified_by_user_id" json:"modified_by_user_id,omitempty"` ModifiedByUserName string `bson:"modified_by_user_name" json:"modified_by_user_name"` ModifiedFromIPAddress string `bson:"modified_from_ip_address" json:"modified_from_ip_address"` }
type InsuranceRequirementListResult ¶
type InsuranceRequirementListResult struct { Results []*InsuranceRequirement `json:"results"` NextCursor primitive.ObjectID `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
type InsuranceRequirementPaginationListAndCountResult ¶
type InsuranceRequirementPaginationListAndCountResult struct { Results []*InsuranceRequirement `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` Count int64 `json:"count"` }
InsuranceRequirementPaginationListResult represents the paginated list results for the InsuranceRequirement records (meaning limited).
type InsuranceRequirementPaginationListResult ¶
type InsuranceRequirementPaginationListResult struct { Results []*InsuranceRequirement `json:"results"` NextCursor string `json:"next_cursor"` HasNextPage bool `json:"has_next_page"` }
InsuranceRequirementPaginationListResult represents the paginated list results for the associate records.
type InsuranceRequirementStorer ¶
type InsuranceRequirementStorer interface { Create(ctx context.Context, m *InsuranceRequirement) error GetByID(ctx context.Context, id primitive.ObjectID) (*InsuranceRequirement, error) GetByPublicID(ctx context.Context, oldID uint64) (*InsuranceRequirement, error) GetByEmail(ctx context.Context, email string) (*InsuranceRequirement, error) GetByVerificationCode(ctx context.Context, verificationCode string) (*InsuranceRequirement, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*InsuranceRequirement, error) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *InsuranceRequirement) error ListByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (*InsuranceRequirementPaginationListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) ([]*InsuranceRequirementAsSelectOption, error) CountByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (int64, error) ListAndCountByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (*InsuranceRequirementPaginationListAndCountResult, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error }
InsuranceRequirementStorer Interface for user.
func NewDatastore ¶
type InsuranceRequirementStorerImpl ¶
type InsuranceRequirementStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (InsuranceRequirementStorerImpl) CheckIfExistsByEmail ¶
func (InsuranceRequirementStorerImpl) CountByFilter ¶
func (impl InsuranceRequirementStorerImpl) CountByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (int64, error)
func (InsuranceRequirementStorerImpl) Create ¶
func (impl InsuranceRequirementStorerImpl) Create(ctx context.Context, u *InsuranceRequirement) error
func (InsuranceRequirementStorerImpl) DeleteByID ¶
func (InsuranceRequirementStorerImpl) GetByEmail ¶
func (impl InsuranceRequirementStorerImpl) GetByEmail(ctx context.Context, email string) (*InsuranceRequirement, error)
func (InsuranceRequirementStorerImpl) GetByID ¶
func (impl InsuranceRequirementStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*InsuranceRequirement, error)
func (InsuranceRequirementStorerImpl) GetByPublicID ¶
func (impl InsuranceRequirementStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*InsuranceRequirement, error)
func (InsuranceRequirementStorerImpl) GetByVerificationCode ¶
func (impl InsuranceRequirementStorerImpl) GetByVerificationCode(ctx context.Context, verificationCode string) (*InsuranceRequirement, error)
func (InsuranceRequirementStorerImpl) GetLatestByTenantID ¶
func (impl InsuranceRequirementStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*InsuranceRequirement, error)
func (*InsuranceRequirementStorerImpl) ListAndCountByFilter ¶
func (c *InsuranceRequirementStorerImpl) ListAndCountByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (*InsuranceRequirementPaginationListAndCountResult, error)
func (InsuranceRequirementStorerImpl) ListAsSelectOptionByFilter ¶
func (impl InsuranceRequirementStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) ([]*InsuranceRequirementAsSelectOption, error)
func (InsuranceRequirementStorerImpl) ListByFilter ¶
func (impl InsuranceRequirementStorerImpl) ListByFilter(ctx context.Context, f *InsuranceRequirementPaginationListFilter) (*InsuranceRequirementPaginationListResult, error)
func (InsuranceRequirementStorerImpl) UpdateByID ¶
func (impl InsuranceRequirementStorerImpl) UpdateByID(ctx context.Context, m *InsuranceRequirement) error
Click to show internal directories.
Click to hide internal directories.