encoding

package
v0.78.4-patch.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) MarshalText

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

MarshalText marshal a duration into bytes.

func (*Duration) UnmarshalText

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

UnmarshalText unmarshal a duration from bytes.

type LogLevel

type LogLevel struct {
	zapcore.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() zapcore.Level

Get return the store value.

func (LogLevel) MarshalText

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

MarshalText marshal a loglevel into bytes.

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