types

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	fs.FS
	// contains filtered or unexported fields
}

func NewFS

func NewFS(filePath string) (FS, error)

func (*FS) IsEmpty

func (f *FS) IsEmpty() bool

IsEmpty checks if the template is empty.

func (*FS) MarshalJSON

func (f *FS) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (FS) MarshalText

func (f FS) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*FS) String

func (f *FS) String() string

String returns the path of the template.

func (*FS) UnmarshalText

func (f *FS) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type RegexpSlice added in v1.26.0

type RegexpSlice []*regexp.Regexp

func (RegexpSlice) MarshalText added in v1.26.0

func (s RegexpSlice) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler interface.

func (RegexpSlice) String added in v1.26.0

func (s RegexpSlice) String() string

String returns the string representation of the RegexpSlice.

func (*RegexpSlice) UnmarshalJSON added in v1.26.0

func (s *RegexpSlice) UnmarshalJSON(jsonBytes []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*RegexpSlice) UnmarshalText added in v1.26.0

func (s *RegexpSlice) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (*RegexpSlice) UnmarshalYAML added in v1.26.0

func (s *RegexpSlice) UnmarshalYAML(data *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type Secret

type Secret string

Secret represents a secret value that can be a plain string or a file path. If the value starts with "file://", it is treated as a file path, and the secret value is read from the file. The "file://" syntax supports environment variables. For example, "file://$HOME/my_secret.txt" would read the secret from the "my_secret.txt" file in the user's home directory.

func (Secret) MarshalJSON

func (s Secret) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Secret) MarshalText

func (s Secret) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler interface for Secret

func (Secret) String

func (s Secret) String() string

String reassembles the Secret into a valid string.

func (*Secret) UnmarshalText

func (s *Secret) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Secret

type StringSlice

type StringSlice []string

func (StringSlice) MarshalText

func (s StringSlice) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler interface.

func (StringSlice) String

func (s StringSlice) String() string

String returns the string representation of the URL.

func (*StringSlice) UnmarshalJSON

func (s *StringSlice) UnmarshalJSON(jsonBytes []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*StringSlice) UnmarshalText

func (s *StringSlice) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (*StringSlice) UnmarshalYAML added in v1.26.0

func (s *StringSlice) UnmarshalYAML(data *yaml.Node) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type Template

type Template struct {
	*template.Template
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate(filePath string) (Template, error)

func (*Template) IsEmpty

func (t *Template) IsEmpty() bool

IsEmpty checks if the template is empty.

func (*Template) MarshalJSON

func (t *Template) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Template) MarshalText

func (t Template) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*Template) String

func (t *Template) String() string

String returns the path of the template.

func (*Template) UnmarshalText

func (t *Template) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type URL

type URL struct {
	*url.URL
}

func NewURL

func NewURL(u string) (URL, error)

func (*URL) IsEmpty

func (u *URL) IsEmpty() bool

IsEmpty checks if the URL is empty.

func (*URL) MarshalJSON

func (u *URL) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (URL) MarshalText

func (u URL) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler interface.

func (URL) String

func (u URL) String() string

String returns the string representation of the URL.

func (*URL) UnmarshalText

func (u *URL) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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