types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 132

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 BaseAttribute

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

func (BaseAttribute) GetMetadata

func (b BaseAttribute) GetMetadata() Metadata

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

func BoolUnresolvable

func BoolUnresolvable(m 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

func BytesUnresolvable

func BytesUnresolvable(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

func IntUnresolvable

func IntUnresolvable(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 NewTestMetadata

func NewTestMetadata() Metadata

func NewUnmanagedMetadata

func NewUnmanagedMetadata() Metadata

func (Metadata) GetMetadata

func (m Metadata) GetMetadata() Metadata

func (Metadata) GetRawValue

func (m Metadata) GetRawValue() interface{}

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

func (m Metadata) IsMultiLine() bool

func (Metadata) IsUnmanaged

func (m Metadata) IsUnmanaged() bool

func (Metadata) Parent

func (m Metadata) Parent() *Metadata

func (Metadata) Range

func (m Metadata) Range() Range

func (Metadata) Reference

func (m Metadata) Reference() Reference

func (Metadata) String

func (m Metadata) String() string

func (Metadata) WithParent

func (m Metadata) WithParent(p Metadata) Metadata

type Range

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

type Reference

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

type StringEqualityOption

type StringEqualityOption int
const (
	IgnoreCase StringEqualityOption = iota
	IsPallindrome
)

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