 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func GetOrganizationNameFromHeader(ctx context.Context) (string, error)
- func GetRawToken(ctx context.Context) (string, error)
- func WithCurrentAPIToken(ctx context.Context, token *APIToken) context.Context
- func WithCurrentOrg(ctx context.Context, org *Org) context.Context
- func WithCurrentUser(ctx context.Context, user *User) context.Context
- func WithMembership(ctx context.Context, m *Membership) context.Context
- type APIToken
- type Membership
- type Org
- type ResourceMembership
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrganizationNameFromHeader ¶ added in v0.165.0
func GetRawToken ¶ added in v0.165.0
GetRawToken takes whatever Bearer token is in the request
func WithCurrentAPIToken ¶
func WithMembership ¶ added in v1.11.0
func WithMembership(ctx context.Context, m *Membership) context.Context
Types ¶
type APIToken ¶
type APIToken struct {
	ID string
	// Token Name
	Name        string
	CreatedAt   *time.Time
	Token       string
	ProjectID   *uuid.UUID
	ProjectName *string
}
    func CurrentAPIToken ¶
type Membership ¶ added in v1.11.0
type Membership struct {
	UserID    uuid.UUID
	Resources []*ResourceMembership
}
    func CurrentMembership ¶ added in v1.11.0
func CurrentMembership(ctx context.Context) *Membership
type Org ¶
func CurrentOrg ¶
type ResourceMembership ¶ added in v1.11.0
 Click to show internal directories. 
   Click to hide internal directories.