entities

package
v0.141.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCurrentAPIToken

func WithCurrentAPIToken(ctx context.Context, token *APIToken) context.Context

func WithCurrentOrg

func WithCurrentOrg(ctx context.Context, org *Org) context.Context

func WithCurrentUser

func WithCurrentUser(ctx context.Context, user *User) context.Context

Types

type APIToken

type APIToken struct {
	ID        string
	CreatedAt *time.Time
	Token     string
}

func CurrentAPIToken

func CurrentAPIToken(ctx context.Context) *APIToken

type Org

type Org struct {
	ID, Name  string
	CreatedAt *time.Time
}

func CurrentOrg

func CurrentOrg(ctx context.Context) *Org

type User

type User struct {
	Email, ID string
	CreatedAt *time.Time
}

Utils to get and set information from context

func CurrentUser

func CurrentUser(ctx context.Context) *User

RequestID tries to retrieve requestID from the given context. If it doesn't exist, an empty string is returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL