types

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRange

func NewRange(filename string, startLine int, endLine int) baseRange

Types

type BoolValue

type BoolValue interface {
	Value() bool
	IsTrue() bool
	IsFalse() bool
	// contains filtered or unexported methods
}

func Bool

func Bool(value bool, metadata Metadata) BoolValue

func BoolDefault

func BoolDefault(value bool, metadata Metadata) BoolValue

func BoolExplicit

func BoolExplicit(value bool, metadata Metadata) BoolValue

type BytesValue

type BytesValue interface {
	Value() []byte
	Len() int
	// contains filtered or unexported methods
}

func Bytes

func Bytes(value []byte, m *Metadata) BytesValue

func BytesDefault

func BytesDefault(value []byte, m *Metadata) BytesValue

func BytesExplicit

func BytesExplicit(value []byte, m *Metadata) BytesValue

type FakeReference

type FakeReference struct {
}

func (*FakeReference) LogicalID

func (f *FakeReference) LogicalID() string

func (*FakeReference) RefersTo

func (f *FakeReference) RefersTo(r Reference) bool

func (*FakeReference) String

func (f *FakeReference) String() string

type IntValue

type IntValue interface {
	Value() int
	EqualTo(i int) bool
	NotEqualTo(i int) bool
	LessThan(i int) bool
	GreaterThan(i int) bool
	// contains filtered or unexported methods
}

func Int

func Int(value int, m Metadata) IntValue

func IntDefault

func IntDefault(value int, m Metadata) IntValue

func IntExplicit

func IntExplicit(value int, m Metadata) IntValue

type MapValue

type MapValue interface {
	Value() map[string]string
	HasKey(key string) bool
	Len() int
	// contains filtered or unexported methods
}

func Map

func Map(value map[string]string, m *Metadata) MapValue

func MapDefault

func MapDefault(value map[string]string, m *Metadata) MapValue

func MapExplicit

func MapExplicit(value map[string]string, m *Metadata) MapValue

type Metadata

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

func NewMetadata

func NewMetadata(r Range, ref Reference) Metadata

func NewUnmanagedMetadata

func NewUnmanagedMetadata(r Range, ref Reference) Metadata

func (*Metadata) IsDefault

func (m *Metadata) IsDefault() bool

func (*Metadata) IsExplicit

func (m *Metadata) IsExplicit() bool

func (*Metadata) IsManaged

func (m *Metadata) IsManaged() bool

func (*Metadata) Range

func (m *Metadata) Range() Range

func (*Metadata) Reference

func (m *Metadata) Reference() Reference

func (*Metadata) String

func (m *Metadata) String() string

type Range

type Range interface {
	GetFilename() string
	GetStartLine() int
	GetEndLine() int
	String() string
}

type Reference

type Reference interface {
	String() string
	LogicalID() string
	RefersTo(r Reference) bool
}

type StringEqualityOption

type StringEqualityOption int
const (
	IgnoreCase StringEqualityOption = iota
)

type StringValue

type StringValue interface {
	Value() string
	IsEmpty() bool
	IsNotEmpty() bool
	IsOneOf(values ...string) bool
	EqualTo(value string, equalityOptions ...StringEqualityOption) bool
	NotEqualTo(value string, equalityOptions ...StringEqualityOption) bool
	StartsWith(prefix string, equalityOptions ...StringEqualityOption) bool
	EndsWith(suffix string, equalityOptions ...StringEqualityOption) bool
	Contains(value string, equalityOptions ...StringEqualityOption) bool
	// contains filtered or unexported methods
}

func String

func String(str string, m Metadata) StringValue

func StringDefault

func StringDefault(value string, m Metadata) StringValue

func StringExplicit

func StringExplicit(value string, m Metadata) StringValue

func StringUnresolvable

func StringUnresolvable(m Metadata) StringValue

type TimeValue

type TimeValue interface {
	Value() *time.Time
	LessThan(i time.Time) bool
	GreaterThan(i time.Time) bool
	IsNever() bool
	// contains filtered or unexported methods
}

func Time

func Time(value time.Time, m *Metadata) TimeValue

func TimeDefault

func TimeDefault(value time.Time, m *Metadata) TimeValue

func TimeExplicit

func TimeExplicit(value time.Time, m *Metadata) TimeValue

Jump to

Keyboard shortcuts

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