template

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTemplate

func NewTemplate(name, plain string) (*template.Template, error)

Types

type Bool

type Bool struct {
	// contains filtered or unexported fields
}

func BoolOf

func BoolOf(plain bool) Bool

func MustNewBool

func MustNewBool(plain string) Bool

func NewBool

func NewBool(plain string) (Bool, error)

func (Bool) IsEqualTo

func (this Bool) IsEqualTo(other any) bool

func (Bool) IsHardCoded

func (this Bool) IsHardCoded() bool

func (Bool) IsZero

func (this Bool) IsZero() bool

func (Bool) MarshalText

func (this Bool) MarshalText() (text []byte, err error)

func (Bool) Render

func (this Bool) Render(data any) (bool, error)

func (*Bool) Set

func (this *Bool) Set(text string) error

func (Bool) String

func (this Bool) String() string

func (*Bool) UnmarshalText

func (this *Bool) UnmarshalText(text []byte) error

func (Bool) Validate added in v0.4.0

func (this Bool) Validate() error

type Duration added in v0.5.0

type Duration struct {
	// contains filtered or unexported fields
}

func DurationOf added in v0.5.0

func DurationOf(v time.Duration) Duration

func MustNewDuration added in v0.5.0

func MustNewDuration(plain string) Duration

func NewDuration added in v0.5.0

func NewDuration(plain string) (Duration, error)

func (Duration) IsEqualTo added in v0.5.0

func (this Duration) IsEqualTo(other any) bool

func (Duration) IsHardCoded added in v0.5.0

func (this Duration) IsHardCoded() bool

func (Duration) IsZero added in v0.5.0

func (this Duration) IsZero() bool

func (Duration) MarshalText added in v0.5.0

func (this Duration) MarshalText() (text []byte, err error)

func (Duration) Render added in v0.5.0

func (this Duration) Render(data any) (time.Duration, error)

func (*Duration) Set added in v0.5.0

func (this *Duration) Set(text string) error

func (Duration) String added in v0.5.0

func (this Duration) String() string

func (*Duration) UnmarshalText added in v0.5.0

func (this *Duration) UnmarshalText(text []byte) error

func (Duration) Validate added in v0.5.0

func (this Duration) Validate() error

type Int64 added in v0.4.0

type Int64 struct {
	// contains filtered or unexported fields
}

func Int64Of added in v0.4.0

func Int64Of(v int64) Int64

func MustNewInt64 added in v0.4.0

func MustNewInt64(plain string) Int64

func NewInt64 added in v0.4.0

func NewInt64(plain string) (Int64, error)

func (Int64) IsEqualTo added in v0.4.0

func (this Int64) IsEqualTo(other any) bool

func (Int64) IsHardCoded added in v0.4.0

func (this Int64) IsHardCoded() bool

func (Int64) IsZero added in v0.4.0

func (this Int64) IsZero() bool

func (Int64) MarshalText added in v0.4.0

func (this Int64) MarshalText() (text []byte, err error)

func (Int64) Render added in v0.4.0

func (this Int64) Render(data any) (int64, error)

func (*Int64) Set added in v0.4.0

func (this *Int64) Set(text string) error

func (Int64) String added in v0.4.0

func (this Int64) String() string

func (*Int64) UnmarshalText added in v0.4.0

func (this *Int64) UnmarshalText(text []byte) error

func (Int64) Validate added in v0.4.0

func (this Int64) Validate() error

type String

type String struct {
	// contains filtered or unexported fields
}

func MustNewString

func MustNewString(plain string) String

func NewString

func NewString(plain string) (String, error)

func (String) IsEqualTo

func (this String) IsEqualTo(other any) bool

func (String) IsHardCoded

func (this String) IsHardCoded() bool

func (String) IsZero

func (this String) IsZero() bool

func (String) MarshalText

func (this String) MarshalText() (text []byte, err error)

func (String) Render

func (this String) Render(data any) (string, error)

func (*String) Set

func (this *String) Set(text string) error

func (String) String

func (this String) String() string

func (*String) UnmarshalText

func (this *String) UnmarshalText(text []byte) error

func (String) Validate added in v0.4.0

func (this String) Validate() error

type Strings added in v0.2.0

type Strings []String

func MustNewStrings added in v0.2.0

func MustNewStrings(plains ...string) Strings

func NewStrings added in v0.2.0

func NewStrings(plains ...string) (Strings, error)

func (Strings) IsEqualTo added in v0.2.0

func (this Strings) IsEqualTo(other any) bool

func (Strings) IsZero added in v0.2.0

func (this Strings) IsZero() bool

func (Strings) Render added in v0.2.0

func (this Strings) Render(data any) ([]string, error)

func (Strings) Validate added in v0.4.0

func (this Strings) Validate() error

type TextMarshaller

type TextMarshaller[T TextMarshallerArgument, PT TextMarshallerArgumentP[T]] struct {
	// contains filtered or unexported fields
}

func MustNewTextMarshaller

func MustNewTextMarshaller[T TextMarshallerArgument, PT TextMarshallerArgumentP[T]](plain string) TextMarshaller[T, PT]

func NewTextMarshaller

func NewTextMarshaller[T TextMarshallerArgument, PT TextMarshallerArgumentP[T]](plain string) (TextMarshaller[T, PT], error)

func (TextMarshaller[T, PT]) IsEqualTo

func (this TextMarshaller[T, PT]) IsEqualTo(other any) bool

func (TextMarshaller[T, PT]) IsZero

func (this TextMarshaller[T, PT]) IsZero() bool

func (TextMarshaller[T, PT]) MarshalText

func (this TextMarshaller[T, PT]) MarshalText() (text []byte, err error)

func (TextMarshaller[T, PT]) Render

func (this TextMarshaller[T, PT]) Render(data any) (T, error)

func (*TextMarshaller[T, PT]) Set

func (this *TextMarshaller[T, PT]) Set(text string) error

func (TextMarshaller[T, PT]) String

func (this TextMarshaller[T, PT]) String() string

func (*TextMarshaller[T, PT]) UnmarshalText

func (this *TextMarshaller[T, PT]) UnmarshalText(text []byte) error

func (TextMarshaller[T, PT]) Validate added in v0.4.0

func (this TextMarshaller[T, PT]) Validate() error

type TextMarshallerArgument

type TextMarshallerArgument interface {
	encoding.TextMarshaler
}

type TextMarshallerArgumentP

type TextMarshallerArgumentP[T TextMarshallerArgument] interface {
	*T
	encoding.TextUnmarshaler
}

type Uint64

type Uint64 struct {
	// contains filtered or unexported fields
}

func MustNewUint64

func MustNewUint64(plain string) Uint64

func NewUint64

func NewUint64(plain string) (Uint64, error)

func Uint64Of

func Uint64Of(v uint64) Uint64

func (Uint64) IsEqualTo

func (this Uint64) IsEqualTo(other any) bool

func (Uint64) IsHardCoded

func (this Uint64) IsHardCoded() bool

func (Uint64) IsZero

func (this Uint64) IsZero() bool

func (Uint64) MarshalText

func (this Uint64) MarshalText() (text []byte, err error)

func (Uint64) Render

func (this Uint64) Render(data any) (uint64, error)

func (*Uint64) Set

func (this *Uint64) Set(text string) error

func (Uint64) String

func (this Uint64) String() string

func (*Uint64) UnmarshalText

func (this *Uint64) UnmarshalText(text []byte) error

func (Uint64) Validate added in v0.4.0

func (this Uint64) Validate() error

type Url added in v0.4.0

type Url struct {
	// contains filtered or unexported fields
}

func MustNewUrl added in v0.4.0

func MustNewUrl(plain string) Url

func NewUrl added in v0.4.0

func NewUrl(plain string) (Url, error)

func UrlOf added in v0.4.0

func UrlOf(in *url.URL) Url

func (Url) IsEqualTo added in v0.4.0

func (this Url) IsEqualTo(other any) bool

func (Url) IsHardCoded added in v0.4.0

func (this Url) IsHardCoded() bool

func (Url) IsZero added in v0.4.0

func (this Url) IsZero() bool

func (Url) MarshalText added in v0.4.0

func (this Url) MarshalText() (text []byte, err error)

func (Url) Render added in v0.4.0

func (this Url) Render(data any) (*url.URL, error)

func (*Url) Set added in v0.4.0

func (this *Url) Set(text string) error

func (Url) String added in v0.4.0

func (this Url) String() string

func (*Url) UnmarshalText added in v0.4.0

func (this *Url) UnmarshalText(text []byte) error

func (Url) Validate added in v0.4.0

func (this Url) Validate() error

Jump to

Keyboard shortcuts

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