Documentation
¶
Index ¶
Constants ¶
View Source
const (
IsArchivedKey = "is_archived"
)
Variables ¶
View Source
var IsArchivedKeyFn = contract.PathKeyFn(IsArchivedKey)
Functions ¶
func Idx ¶ added in v0.0.30
func Idx(p ...string) []contract.IndexEntry
func IdxSrch ¶ added in v0.0.30
func IdxSrch(p ...string) []contract.SearchIndexEntry
func Rules ¶ added in v0.0.24
func Rules(p ...string) contractpkg.QueryParamRules
Types ¶
type Archive ¶
type Archive struct {
Meta `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
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.
type Core ¶
type Core struct {
IsArchived *bool `json:"is_archived" validate:"nnpt"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetIsArchived ¶
func (*Core) SetIsArchived ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithIsArchived ¶
func WithIsArchived(x bool) CoreOption
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.