Documentation ¶
Index ¶
- Variables
- func AccountId(ctx context.Context) int64
- func AccountIdOrZero(ctx context.Context) int64
- func IdentityHeader(ctx context.Context) string
- func WithAccountId(ctx context.Context, accountId int64) context.Context
- func WithIdentity(ctx context.Context, id Principal) context.Context
- func WithIdentityFrom64(ctx context.Context, id string) (context.Context, error)
- type Principal
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingAccountInContext = errors.New("operation requires account_id in context")
Functions ¶
func AccountIdOrZero ¶
AccountIdOrZero returns current account model or 0 when not set.
func IdentityHeader ¶
IdentityHeader returns identity header (base64-encoded JSON)
func WithAccountId ¶
WithAccountId returns context copy with account id value.
func WithIdentity ¶
WithIdentity returns context copy with identity.
Types ¶
Click to show internal directories.
Click to hide internal directories.