Documentation
¶
Index ¶
- Constants
- type SmartFolder
- type SmartFolderAsSelectOption
- type SmartFolderListResult
- type SmartFolderPaginationListFilter
- type SmartFolderPaginationListResult
- type SmartFolderStorer
- type SmartFolderStorerImpl
- func (impl SmartFolderStorerImpl) CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
- func (impl SmartFolderStorerImpl) Create(ctx context.Context, u *SmartFolder) error
- func (impl SmartFolderStorerImpl) CreateOrGetByID(ctx context.Context, hh *SmartFolder) (*SmartFolder, error)
- func (impl SmartFolderStorerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl SmartFolderStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*SmartFolder, error)
- func (impl SmartFolderStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*SmartFolder, error)
- func (impl SmartFolderStorerImpl) GetByText(ctx context.Context, text string) (*SmartFolder, error)
- func (impl SmartFolderStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SmartFolder, error)
- func (impl SmartFolderStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *SmartFolderPaginationListFilter) ([]*SmartFolderAsSelectOption, error)
- func (impl SmartFolderStorerImpl) ListByFilter(ctx context.Context, f *SmartFolderPaginationListFilter) (*SmartFolderPaginationListResult, error)
- func (impl SmartFolderStorerImpl) ListByTenantID(ctx context.Context, tid primitive.ObjectID) (*SmartFolderPaginationListResult, error)
- func (impl SmartFolderStorerImpl) UpdateByID(ctx context.Context, m *SmartFolder) error
Constants ¶
View Source
const ( StatusActive = 1 StatusArchived = 2 CategoryUnspecified = 1 CategoryGovernmentCanada = 2 )
View Source
const ( OrderAscending = 1 OrderDescending = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SmartFolder ¶
type SmartFolder struct {
ID primitive.ObjectID `bson:"_id" json:"id"`
Name string `bson:"name" json:"name"`
Category uint64 `bson:"category,omitempty" json:"category,omitempty"`
SubCategory uint64 `bson:"sub_category,omitempty" json:"sub_category,omitempty"`
SortNumber int8 `bson:"sort_number" json:"sort_number"`
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"`
TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id"`
TenantName string `bson:"tenant_name" json:"tenant_name"`
}
type SmartFolderListResult ¶
type SmartFolderListResult struct {
Results []*SmartFolder `json:"results"`
NextCursor primitive.ObjectID `json:"next_cursor"`
HasNextPage bool `json:"has_next_page"`
}
type SmartFolderPaginationListResult ¶
type SmartFolderPaginationListResult struct {
Results []*SmartFolder `json:"results"`
NextCursor string `json:"next_cursor"`
HasNextPage bool `json:"has_next_page"`
}
SmartFolderPaginationListResult represents the paginated list results for the associate records.
type SmartFolderStorer ¶
type SmartFolderStorer interface {
Create(ctx context.Context, m *SmartFolder) error
CreateOrGetByID(ctx context.Context, hh *SmartFolder) (*SmartFolder, error)
GetByID(ctx context.Context, id primitive.ObjectID) (*SmartFolder, error)
GetByPublicID(ctx context.Context, oldID uint64) (*SmartFolder, error)
GetByText(ctx context.Context, text string) (*SmartFolder, error)
GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SmartFolder, error)
CheckIfExistsByEmail(ctx context.Context, email string) (bool, error)
UpdateByID(ctx context.Context, m *SmartFolder) error
ListByFilter(ctx context.Context, f *SmartFolderPaginationListFilter) (*SmartFolderPaginationListResult, error)
ListAsSelectOptionByFilter(ctx context.Context, f *SmartFolderPaginationListFilter) ([]*SmartFolderAsSelectOption, error)
ListByTenantID(ctx context.Context, tid primitive.ObjectID) (*SmartFolderPaginationListResult, error)
DeleteByID(ctx context.Context, id primitive.ObjectID) error
}
SmartFolderStorer Interface for user.
func NewDatastore ¶
type SmartFolderStorerImpl ¶
type SmartFolderStorerImpl struct {
Logger *slog.Logger
DbClient *mongo.Client
Collection *mongo.Collection
}
func (SmartFolderStorerImpl) CheckIfExistsByEmail ¶
func (SmartFolderStorerImpl) Create ¶
func (impl SmartFolderStorerImpl) Create(ctx context.Context, u *SmartFolder) error
func (SmartFolderStorerImpl) CreateOrGetByID ¶
func (impl SmartFolderStorerImpl) CreateOrGetByID(ctx context.Context, hh *SmartFolder) (*SmartFolder, error)
func (SmartFolderStorerImpl) DeleteByID ¶
func (SmartFolderStorerImpl) GetByID ¶
func (impl SmartFolderStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*SmartFolder, error)
func (SmartFolderStorerImpl) GetByPublicID ¶
func (impl SmartFolderStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*SmartFolder, error)
func (SmartFolderStorerImpl) GetByText ¶
func (impl SmartFolderStorerImpl) GetByText(ctx context.Context, text string) (*SmartFolder, error)
func (SmartFolderStorerImpl) GetLatestByTenantID ¶
func (impl SmartFolderStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*SmartFolder, error)
func (SmartFolderStorerImpl) ListAsSelectOptionByFilter ¶
func (impl SmartFolderStorerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *SmartFolderPaginationListFilter) ([]*SmartFolderAsSelectOption, error)
func (SmartFolderStorerImpl) ListByFilter ¶
func (impl SmartFolderStorerImpl) ListByFilter(ctx context.Context, f *SmartFolderPaginationListFilter) (*SmartFolderPaginationListResult, error)
func (SmartFolderStorerImpl) ListByTenantID ¶
func (impl SmartFolderStorerImpl) ListByTenantID(ctx context.Context, tid primitive.ObjectID) (*SmartFolderPaginationListResult, error)
func (SmartFolderStorerImpl) UpdateByID ¶
func (impl SmartFolderStorerImpl) UpdateByID(ctx context.Context, m *SmartFolder) error
Click to show internal directories.
Click to hide internal directories.