template

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 20 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

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

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)

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

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

Jump to

Keyboard shortcuts

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