entities

package
v0.0.0-...-eb082ec Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Id          string
	Name        string
	WorkspaceId string
	IpWhitelist []string

	AuthType AuthType
	// Only set if AuthType == "key"
	KeyAuthId string
}

type AuthType

type AuthType string
const (
	AuthTypeKey AuthType = "key"
	AuthTypeJWT AuthType = "jwt"
)

type Key

type Key struct {
	Id             string
	KeyAuthId      string
	WorkspaceId    string
	Name           string
	Hash           string
	Start          string
	OwnerId        string
	Meta           map[string]any
	CreatedAt      time.Time
	Expires        time.Time
	Ratelimit      *Ratelimit
	ForWorkspaceId string
	Remaining      struct {
		// Whether or not the value in `Remaining` makes any sense or is just a default
		Enabled   bool
		Remaining int64
	}
}

type KeyAuth

type KeyAuth struct {
	Id          string
	WorkspaceId string
}

type Ratelimit

type Ratelimit struct {
	Type           string
	Limit          int64
	RefillRate     int64
	RefillInterval int64
}

type Workspace

type Workspace struct {
	Id                 string
	Name               string
	Slug               string
	TenantId           string
	Internal           bool
	EnableBetaFeatures bool
}

Jump to

Keyboard shortcuts

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