Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentitiesProvider ¶
type IdentitiesProvider interface {
GetIdentities() Identities
}
IdentitiesProvider provides all Identities.
type Identity ¶
Identity represents an thing that can provide an identify. This can be any Go type, but the Identity returned by GetIdentify must be hashable.
type IncrementByOne ¶ added in v0.69.0
type IncrementByOne struct {
// contains filtered or unexported fields
}
IncrementByOne implements Incrementer adding 1 every time Incr is called.
func (*IncrementByOne) Incr ¶ added in v0.69.0
func (c *IncrementByOne) Incr() int
type Incrementer ¶ added in v0.69.0
type Incrementer interface {
Incr() int
}
Incrementer increments and returns the value. Typically used for IDs.
type KeyValueIdentity ¶
A KeyValueIdentity a general purpose identity.
func (KeyValueIdentity) GetIdentity ¶
func (id KeyValueIdentity) GetIdentity() Identity
GetIdentity returns itself.
type Manager ¶
type Manager interface { SearchProvider Add(ids ...Provider) Reset() }
Manager manages identities, and is itself a Provider of Identity.
func NewManager ¶
NewIdentityManager creates a new Manager starting at id.
type PathIdentity ¶
A PathIdentity is a common identity identified by a type and a path, e.g. "layouts" and "_default/single.html".
func NewPathIdentity ¶
func NewPathIdentity(typ, pat string) PathIdentity
NewPathIdentity creates a new Identity with the two identifiers type and path.
func (PathIdentity) GetIdentity ¶
func (id PathIdentity) GetIdentity() Identity
GetIdentity returns itself.
type Provider ¶
type Provider interface {
GetIdentity() Identity
}
Provider provides the hashable Identity.
type SearchProvider ¶ added in v0.79.0
type SearchProvider interface { Provider IdentitiesProvider Search(id Identity) Provider }
SearchProvider provides access to the chained set of identities.