package identity
import "github.com/gohugoio/hugo/identity"
Index ¶
- type Identities
- type IdentitiesProvider
- type Identity
- type KeyValueIdentity
- type Manager
- type PathIdentity
- func NewPathIdentity(typ, pat string) PathIdentity
- func (id PathIdentity) GetIdentity() Identity
- func (id PathIdentity) Name() string
- type Provider
Types ¶
type Identities ¶
Identities stores identity providers.
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 KeyValueIdentity ¶
A KeyValueIdentity a general purpose identity.
func (KeyValueIdentity) GetIdentity ¶
func (id KeyValueIdentity) GetIdentity() Identity
GetIdentity returns itself.
func (KeyValueIdentity) Name ¶
func (id KeyValueIdentity) Name() string
Name returns the Key.
type Manager ¶
type Manager interface { IdentitiesProvider Provider Add(ids ...Provider) Search(id Identity) 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.
func (PathIdentity) Name ¶
func (id PathIdentity) Name() string
Name returns the Path.
type Provider ¶
type Provider interface { GetIdentity() Identity }
Provider provides the hashable Identity.
Source Files ¶
- Version
- v0.64.0
- Published
- Feb 4, 2020
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 3 hours ago –
Tools for package owners.