timezone

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimezoneKey = "timezone"
)

Variables

This section is empty.

Functions

func Idx added in v0.0.30

func Idx(collection string) contract.CreateIndexesOptions

func IdxSrch added in v0.0.30

func IdxSrch(collection string) contract.CreateSearchIndexesOptions

func Rules

Types

type Comp

type Comp struct{}

func ApplyComp

func ApplyComp(c *Comp, modifiers ...CompOption) Comp

type CompOption

type CompOption = contract.CompOption[Comp]

type Core

type Core struct {
	Timezone *string `json:"timezone" validate:"nnpt,nz,tz"`
}

func ApplyCore

func ApplyCore(c *Core, modifiers ...CoreOption) Core

func (*Core) GetTimezone

func (c *Core) GetTimezone() string

func (*Core) SetTimezone

func (c *Core) SetTimezone(x string)

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithTimezone

func WithTimezone(x string) CoreOption

type Meta

type Meta struct{}

func ApplyMeta

func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta

type MetaOption

type MetaOption = contract.MetaOption[Meta]

type Timezone

type Timezone struct {
	Meta `bson:",inline" validate:"recurse"`
	Comp `bson:",inline" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

Timezone represents the timezone that allow timezone scoping for a document.

func New

func New(m Meta, c Comp, cr Core) *Timezone

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL