types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package types includes appenv.Value implementations for primitive types.

We can use them to define an option value with embedding like below.

type HostName struct {
	types.StringValue
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolValue added in v0.1.0

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

func (*BoolValue) Default added in v0.1.0

func (o *BoolValue) Default() interface{}

func (*BoolValue) MarshalText added in v0.1.0

func (o *BoolValue) MarshalText() (text []byte, err error)

func (*BoolValue) UnmarshalText added in v0.1.0

func (o *BoolValue) UnmarshalText(text []byte) error

func (*BoolValue) Value added in v0.1.0

func (o *BoolValue) Value() interface{}

type ByteValue added in v0.1.0

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

func (*ByteValue) Default added in v0.1.0

func (o *ByteValue) Default() interface{}

func (*ByteValue) MarshalText added in v0.1.0

func (o *ByteValue) MarshalText() (text []byte, err error)

func (*ByteValue) UnmarshalText added in v0.1.0

func (o *ByteValue) UnmarshalText(text []byte) error

func (*ByteValue) Value added in v0.1.0

func (o *ByteValue) Value() interface{}

type Config

type Config interface {
	Get() (string, error)
	Set(value string) error
	Unset()
}

type Float32Value added in v0.1.0

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

func (*Float32Value) Default added in v0.1.0

func (o *Float32Value) Default() interface{}

func (*Float32Value) MarshalText added in v0.1.0

func (o *Float32Value) MarshalText() (text []byte, err error)

func (*Float32Value) UnmarshalText added in v0.1.0

func (o *Float32Value) UnmarshalText(text []byte) error

func (*Float32Value) Value added in v0.1.0

func (o *Float32Value) Value() interface{}

type Float64Value added in v0.1.0

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

func (*Float64Value) Default added in v0.1.0

func (o *Float64Value) Default() interface{}

func (*Float64Value) MarshalText added in v0.1.0

func (o *Float64Value) MarshalText() (text []byte, err error)

func (*Float64Value) UnmarshalText added in v0.1.0

func (o *Float64Value) UnmarshalText(text []byte) error

func (*Float64Value) Value added in v0.1.0

func (o *Float64Value) Value() interface{}

type Int16Value added in v0.1.0

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

func (*Int16Value) Default added in v0.1.0

func (o *Int16Value) Default() interface{}

func (*Int16Value) MarshalText added in v0.1.0

func (o *Int16Value) MarshalText() (text []byte, err error)

func (*Int16Value) UnmarshalText added in v0.1.0

func (o *Int16Value) UnmarshalText(text []byte) error

func (*Int16Value) Value added in v0.1.0

func (o *Int16Value) Value() interface{}

type Int32Value added in v0.1.0

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

func (*Int32Value) Default added in v0.1.0

func (o *Int32Value) Default() interface{}

func (*Int32Value) MarshalText added in v0.1.0

func (o *Int32Value) MarshalText() (text []byte, err error)

func (*Int32Value) UnmarshalText added in v0.1.0

func (o *Int32Value) UnmarshalText(text []byte) error

func (*Int32Value) Value added in v0.1.0

func (o *Int32Value) Value() interface{}

type Int64Value added in v0.1.0

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

func (*Int64Value) Default added in v0.1.0

func (o *Int64Value) Default() interface{}

func (*Int64Value) MarshalText added in v0.1.0

func (o *Int64Value) MarshalText() (text []byte, err error)

func (*Int64Value) UnmarshalText added in v0.1.0

func (o *Int64Value) UnmarshalText(text []byte) error

func (*Int64Value) Value added in v0.1.0

func (o *Int64Value) Value() interface{}

type Int8Value added in v0.1.0

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

func (*Int8Value) Default added in v0.1.0

func (o *Int8Value) Default() interface{}

func (*Int8Value) MarshalText added in v0.1.0

func (o *Int8Value) MarshalText() (text []byte, err error)

func (*Int8Value) UnmarshalText added in v0.1.0

func (o *Int8Value) UnmarshalText(text []byte) error

func (*Int8Value) Value added in v0.1.0

func (o *Int8Value) Value() interface{}

type IntValue added in v0.1.0

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

func (*IntValue) Default added in v0.1.0

func (o *IntValue) Default() interface{}

func (*IntValue) MarshalText added in v0.1.0

func (o *IntValue) MarshalText() (text []byte, err error)

func (*IntValue) UnmarshalText added in v0.1.0

func (o *IntValue) UnmarshalText(text []byte) error

func (*IntValue) Value added in v0.1.0

func (o *IntValue) Value() interface{}

type Mask

type Mask interface {
	// Mask secure value.
	Mask(value string) string
}

type RuneValue added in v0.1.0

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

func (*RuneValue) Default added in v0.1.0

func (o *RuneValue) Default() interface{}

func (*RuneValue) MarshalText added in v0.1.0

func (o *RuneValue) MarshalText() (text []byte, err error)

func (*RuneValue) UnmarshalText added in v0.1.0

func (o *RuneValue) UnmarshalText(text []byte) error

func (*RuneValue) Value added in v0.1.0

func (o *RuneValue) Value() interface{}

type StringValue added in v0.1.0

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

func (*StringValue) Default added in v0.1.0

func (o *StringValue) Default() interface{}

func (*StringValue) MarshalText added in v0.1.0

func (o *StringValue) MarshalText() (text []byte, err error)

func (*StringValue) UnmarshalText added in v0.1.0

func (o *StringValue) UnmarshalText(text []byte) error

func (*StringValue) Value added in v0.1.0

func (o *StringValue) Value() interface{}

type Uint16Value added in v0.1.0

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

func (*Uint16Value) Default added in v0.1.0

func (o *Uint16Value) Default() interface{}

func (*Uint16Value) MarshalText added in v0.1.0

func (o *Uint16Value) MarshalText() (text []byte, err error)

func (*Uint16Value) UnmarshalText added in v0.1.0

func (o *Uint16Value) UnmarshalText(text []byte) error

func (*Uint16Value) Value added in v0.1.0

func (o *Uint16Value) Value() interface{}

type Uint32Value added in v0.1.0

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

func (*Uint32Value) Default added in v0.1.0

func (o *Uint32Value) Default() interface{}

func (*Uint32Value) MarshalText added in v0.1.0

func (o *Uint32Value) MarshalText() (text []byte, err error)

func (*Uint32Value) UnmarshalText added in v0.1.0

func (o *Uint32Value) UnmarshalText(text []byte) error

func (*Uint32Value) Value added in v0.1.0

func (o *Uint32Value) Value() interface{}

type Uint64Value added in v0.1.0

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

func (*Uint64Value) Default added in v0.1.0

func (o *Uint64Value) Default() interface{}

func (*Uint64Value) MarshalText added in v0.1.0

func (o *Uint64Value) MarshalText() (text []byte, err error)

func (*Uint64Value) UnmarshalText added in v0.1.0

func (o *Uint64Value) UnmarshalText(text []byte) error

func (*Uint64Value) Value added in v0.1.0

func (o *Uint64Value) Value() interface{}

type Uint8Value added in v0.1.0

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

func (*Uint8Value) Default added in v0.1.0

func (o *Uint8Value) Default() interface{}

func (*Uint8Value) MarshalText added in v0.1.0

func (o *Uint8Value) MarshalText() (text []byte, err error)

func (*Uint8Value) UnmarshalText added in v0.1.0

func (o *Uint8Value) UnmarshalText(text []byte) error

func (*Uint8Value) Value added in v0.1.0

func (o *Uint8Value) Value() interface{}

type UintValue added in v0.1.0

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

func (*UintValue) Default added in v0.1.0

func (o *UintValue) Default() interface{}

func (*UintValue) MarshalText added in v0.1.0

func (o *UintValue) MarshalText() (text []byte, err error)

func (*UintValue) UnmarshalText added in v0.1.0

func (o *UintValue) UnmarshalText(text []byte) error

func (*UintValue) Value added in v0.1.0

func (o *UintValue) Value() interface{}

type Value

type Value interface {
	Value() interface{}
	Default() interface{}
	encoding.TextMarshaler
	encoding.TextUnmarshaler
}

Jump to

Keyboard shortcuts

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