encoding

package
v0.73.0-preview.14 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base64

type Base64 []byte

func (Base64) MarshalFlag

func (b Base64) MarshalFlag() (string, error)

func (*Base64) UnmarshalFlag

func (b *Base64) UnmarshalFlag(s string) error

type Bool

type Bool bool

func (*Bool) UnmarshalFlag

func (b *Bool) UnmarshalFlag(s string) error

type ByteSize

type ByteSize bytesize.ByteSize

func (ByteSize) MarshalFlag

func (b ByteSize) MarshalFlag() (string, error)

func (*ByteSize) UnmarshalFlag

func (b *ByteSize) UnmarshalFlag(s string) error

type Duration

type Duration struct {
	time.Duration
}

Duration is a wrapper over an actual duration so we can represent them as string in the toml configuration.

func (*Duration) Get

func (d *Duration) Get() time.Duration

Get returns the stored duration.

func (Duration) MarshalFlag

func (d Duration) MarshalFlag() (string, error)

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

MarshalText marshal a duraton into bytes.

func (*Duration) UnmarshalFlag

func (d *Duration) UnmarshalFlag(s string) error

func (*Duration) UnmarshalText

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

UnmarshalText unmarshal a duration from bytes.

type LogLevel

type LogLevel struct {
	logging.Level
}

LogLevel is wrapper over the actual log level so they can be specified as strings in the toml configuration.

func (*LogLevel) Get

func (l *LogLevel) Get() logging.Level

Get return the store value.

func (LogLevel) MarshalText

func (l LogLevel) MarshalText() ([]byte, error)

MarshalText marshal a loglevel into bytes.

func (*LogLevel) UnmarshalFlag

func (l *LogLevel) UnmarshalFlag(s string) error

func (*LogLevel) UnmarshalText

func (l *LogLevel) UnmarshalText(text []byte) error

UnmarshalText unmarshal a loglevel from bytes.

Jump to

Keyboard shortcuts

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