ref

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection interface {
	View
	SetUsed(flag bool)
}

type Collections

type Collections []Collection

func (Collections) OK

func (cs Collections) OK() bool

func (Collections) Resolved

func (cs Collections) Resolved() bool

func (Collections) SetUsed

func (cs Collections) SetUsed(flag bool)

func (Collections) Used

func (cs Collections) Used() bool

type EmptyReferences

type EmptyReferences struct{}

func (EmptyReferences) Merge

func (EmptyReferences) OK

func (EmptyReferences) OK() bool

func (EmptyReferences) Resolved

func (EmptyReferences) Resolved() bool

func (EmptyReferences) SetUsed

func (EmptyReferences) SetUsed(flag bool)

func (EmptyReferences) Used

func (EmptyReferences) Used() bool

type ID

type ID[T any] interface {
	comparable
	Less(other T) bool
}

type Log

type Log[T ID[T]] struct {
	// contains filtered or unexported fields
}

func CopyLog

func CopyLog[T ID[T]](from *Log[T]) *Log[T]

func InitialLog

func InitialLog[T ID[T]](refs ...Reference[T]) *Log[T]

func NewLog

func NewLog[T ID[T]]() *Log[T]

func (*Log[T]) AllReferences

func (l *Log[T]) AllReferences() []Reference[T]

func (*Log[T]) ErroredReferences

func (l *Log[T]) ErroredReferences() []Reference[T]

func (*Log[T]) Filter

func (l *Log[T]) Filter(fn func(Reference[T]) bool) []Reference[T]

func (*Log[T]) ForEach

func (l *Log[T]) ForEach(fn func(Reference[T]))

func (*Log[T]) Merge

func (l *Log[T]) Merge(others ...*Log[T]) *Log[T]

func (*Log[T]) OK

func (l *Log[T]) OK() bool

func (*Log[T]) OKReferences

func (l *Log[T]) OKReferences() []Reference[T]

func (*Log[T]) Resolved

func (l *Log[T]) Resolved() bool

func (*Log[T]) ResolvedReferences

func (l *Log[T]) ResolvedReferences() []Reference[T]

func (*Log[T]) Set

func (l *Log[T]) Set(r Reference[T])

func (*Log[T]) SetUsed

func (l *Log[T]) SetUsed(flag bool)

func (*Log[T]) UnresolvedReferences

func (l *Log[T]) UnresolvedReferences() []Reference[T]

func (*Log[T]) Used

func (l *Log[T]) Used() bool

func (*Log[T]) UsedReferences

func (l *Log[T]) UsedReferences() []Reference[T]

type Reference

type Reference[T ID[T]] struct {
	// contains filtered or unexported fields
}

func Errored

func Errored[T ID[T]](id T, err error) Reference[T]

func OK

func OK[T ID[T]](id T) Reference[T]

func Observed

func Observed[T ID[T]](id T) Reference[T]

func Unused

func Unused[T ID[T]](ref Reference[T]) Reference[T]

func (Reference[_]) Error

func (r Reference[_]) Error() error

func (Reference[T]) ID

func (r Reference[T]) ID() T

func (Reference[_]) Resolved

func (r Reference[_]) Resolved() bool

func (Reference[_]) Used

func (r Reference[_]) Used() bool

type References

type References[T any] interface {
	Collection
	Merge(others ...T) T
}

type View

type View interface {
	Used() bool
	Resolved() bool
	OK() bool
}

Jump to

Keyboard shortcuts

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