Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultStateExpiryTime = time.Minute * 5 MinStateExpiryTime = time.Minute * 1 MaxStateExpiryTime = time.Minute * 30 )
default state expiry time
Variables ¶
View Source
var ( ErrStateNotFound = errors.New("state: not found") ErrCreatedByEmpty = errors.New("state: created by is empty") ErrExpiryTimeMoreThanMax = errors.New("state: expiry time is more than max expiry time allowed") ErrExpiryTimeLessThanMin = errors.New("state: expiry time is less than min expiry time allowed") )
error list of state
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { // CreatedBy define by whom the state is created CreatedBy string // CreatedByHashID is a hash of user id used externally CreatedByHashID string // Authentication data of state Authentication authentity.Authentication // metadata that want to be stored in the creation of state MetaData map[string]string ExpiryTime time.Duration ExpiredAt time.Time CreatedAt time.Time }
State data
Click to show internal directories.
Click to hide internal directories.