Documentation
¶
Index ¶
- func AllPowerfulContext(parent context.Context) context.Context
- func LoggedOutContext(parent context.Context) context.Context
- func NewContext(parent context.Context, v *Context) context.Context
- func OmniContext(parent context.Context) context.Context
- type Context
- func (c *Context) GetBaseContext() *Context
- func (v *Context) HasIdentity() bool
- func (v *Context) HasOrg() bool
- func (v *Context) HasPersonalOrg() bool
- func (v *Context) HasPlan(plan string) bool
- func (v *Context) IsAgent() bool
- func (v *Context) IsAllPowerful() bool
- func (v *Context) IsAnonymous() bool
- func (v *Context) IsEmployee() bool
- func (v *Context) IsLoggedOut() bool
- func (v *Context) IsOmni() bool
- func (v *Context) IsOrgAdmin() bool
- func (v *Context) IsTest() bool
- type CtxKey
- type Viewer
- type ViewerRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
Role ViewerRole
ID pulid.ID
OrgID pulid.ID
AccountID string
OrgAccountID string
OrgMembershipRole membershiprole.MembershipRole
SubscriptionPlan string
}
func AllPowerfulVC ¶
func AllPowerfulVC() *Context
func FromContext ¶
func LoggedOutVC ¶
func LoggedOutVC() *Context
func (*Context) GetBaseContext ¶
func (*Context) HasIdentity ¶
func (*Context) HasPersonalOrg ¶
func (*Context) IsAllPowerful ¶
func (*Context) IsAnonymous ¶
func (*Context) IsEmployee ¶
func (*Context) IsLoggedOut ¶
func (*Context) IsOrgAdmin ¶
type ViewerRole ¶
type ViewerRole string
const ( LoggedOut ViewerRole = "LoggedOut" User ViewerRole = "User" Agent ViewerRole = "Agent" AllPowerful ViewerRole = "AllPowerful" Omni ViewerRole = "Omni" Test ViewerRole = "Test" Employee ViewerRole = "Employee" )
Click to show internal directories.
Click to hide internal directories.