Documentation ¶
Index ¶
- Constants
- func Account(ctx context.Context) (config.Account, error)
- func AccountDID(ctx context.Context) (identity.DID, error)
- func Context(ctx context.Context, cs config.Service) (context.Context, error)
- func Copy(ctx context.Context) context.Context
- func DIDFromContext(ctx context.Context) (did identity.DID, err error)
- func Job(ctx context.Context) jobs.JobID
- func New(ctx context.Context, cfg config.Account) (context.Context, error)
- func Nonce(ctx context.Context) (uint32, error)
- func WithJob(ctx context.Context, jobID jobs.JobID) context.Context
- func WithNonce(ctx context.Context, n uint32) context.Context
Constants ¶
View Source
const ( // ErrSelfNotFound must be used when self value is not found in the context ErrSelfNotFound = errors.Error("self value not found in the context") // ErrNonceNotFound must be used when nonce value is not found in context ErrNonceNotFound = errors.Error("nonce value not found in the context") // ErrDIDMissingFromContext sentinel error when did is missing from the context. ErrDIDMissingFromContext = errors.Error("failed to extract did from context") )
Variables ¶
This section is empty.
Functions ¶
func AccountDID ¶
AccountDID extracts the AccountConfig DID from the given context value
func Context ¶
Context updates a context with account info using the configstore, must only be used for api handlers
func DIDFromContext ¶ added in v1.0.0
DIDFromContext returns did from the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.