Documentation
¶
Overview ¶
Package identity defines runtime-owned opaque identifiers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator creates typed runtime IDs from an injected source.
func NewGenerator ¶
NewGenerator creates a Generator that uses source for opaque ID payloads.
func (Generator) NewSessionID ¶
NewSessionID creates a SessionID from the generator's injected source.
type SessionID ¶
type SessionID string
SessionID identifies a Session without disclosing routing or authorization data.
func ParseSessionID ¶
ParseSessionID validates an externally supplied SessionID.
func (SessionID) MarshalJSON ¶
MarshalJSON serializes a validated SessionID as a JSON string.
func (*SessionID) UnmarshalJSON ¶
UnmarshalJSON validates a JSON SessionID string before accepting it.
Click to show internal directories.
Click to hide internal directories.