timezone

package
v0.0.295 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimezoneKey = "timezone"
)

Variables

View Source
var TimezoneKeyFn = contract.PathKeyFn(TimezoneKey)

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

Types

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"`
	Core `bson:",inline" validate:"recurse"`
}

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

func Mock added in v0.0.42

func Mock() *Timezone

func New

func New(m Meta, cr Core) *Timezone

Jump to

Keyboard shortcuts

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