Documentation
¶
Index ¶
Constants ¶
View Source
const (
IsArchivedKey = "is_archived"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
Meta `bson:",inline"`
Comp `bson:",inline"`
// IsArchived indicates whether the document is archived.
// example:false
// required:false
IsArchived *bool `bson:"is_archived" json:"is_archived" validate:"nonnilpointer"`
}
Archive provides a mechanism to flag documents as archived. This flag enables filtering without preventing access to archived documents. It serves as an alternative to deletion, helping maintain data integrity and supporting queries for deprecated or legacy documents. swagger:model
func NewArchive ¶
NewArchive creates a new Archive instance.
func (*Archive) GetIsArchived ¶
GetIsArchived returns whether the document is archived.
func (*Archive) SetIsArchived ¶
SetIsArchived sets the archived status of the document.
type Comp ¶
type Comp struct{}
func ApplyComp ¶
func ApplyComp(c *Comp, modifiers ...CompOption) Comp
type CompOption ¶
type CompOption = contract.CompOption[Comp]
type Meta ¶
type Meta struct{}
func ApplyMeta ¶
func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
Click to show internal directories.
Click to hide internal directories.