values

package
v0.0.0-...-47b5856 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	Underlying bool
}

func NewBool

func NewBool(b bool) (*Bool, error)

func (*Bool) Proto

func (b *Bool) Proto() (*pb.Value, error)

func (*Bool) Unwrap

func (b *Bool) Unwrap() (any, error)

type Bytes

type Bytes struct {
	Underlying []byte
}

func NewBytes

func NewBytes(b []byte) (*Bytes, error)

func (*Bytes) Proto

func (b *Bytes) Proto() (*pb.Value, error)

func (*Bytes) Unwrap

func (b *Bytes) Unwrap() (any, error)

type Decimal

type Decimal struct {
	Underlying decimal.Decimal
}

func NewDecimal

func NewDecimal(d decimal.Decimal) (*Decimal, error)

func (*Decimal) Proto

func (d *Decimal) Proto() (*pb.Value, error)

func (*Decimal) Unwrap

func (d *Decimal) Unwrap() (any, error)

type Int64

type Int64 struct {
	Underlying int64
}

func NewInt64

func NewInt64(i int64) (*Int64, error)

func (*Int64) Proto

func (i *Int64) Proto() (*pb.Value, error)

func (*Int64) Unwrap

func (i *Int64) Unwrap() (any, error)

type List

type List struct {
	Underlying []Value
}

func NewList

func NewList(l []any) (*List, error)

func (*List) Proto

func (l *List) Proto() (*pb.Value, error)

func (*List) Unwrap

func (l *List) Unwrap() (any, error)

type Map

type Map struct {
	Underlying map[string]Value
}

func NewMap

func NewMap(m map[string]any) (*Map, error)

func (*Map) Proto

func (m *Map) Proto() (*pb.Value, error)

func (*Map) Unwrap

func (m *Map) Unwrap() (any, error)

type String

type String struct {
	Underlying string
}

func NewString

func NewString(s string) (*String, error)

func (*String) Proto

func (s *String) Proto() (*pb.Value, error)

func (*String) Unwrap

func (s *String) Unwrap() (any, error)

type Unwrappable

type Unwrappable interface {
	Unwrap() (any, error)
}

type Value

type Value interface {
	Proto() (*pb.Value, error)

	Unwrappable
}

func FromProto

func FromProto(val *pb.Value) (Value, error)

func Wrap

func Wrap(v any) (Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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