model

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvocationStatusPending   = "pending"
	InvocationStatusRunning   = "running"
	InvocationStatusFailed    = "failed"
	InvocationStatusSucceeded = "succeeded"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIToken added in v1.1.0

type APIToken struct {
	ID         string     `db:"id"`
	Token      string     `db:"token"`
	ClientName string     `db:"client_name"`
	LastUsedAt *time.Time `db:"last_used_at"`
	CreatedAt  time.Time  `db:"created_at"`
	UpdatedAt  time.Time  `db:"updated_at"`
}

type Function

type Function struct {
	ID          string         `db:"id"`
	Name        string         `db:"name"`
	Image       string         `db:"image"`
	SkipLogging bool           `db:"skip_logging"`
	CreatedAt   time.Time      `db:"created_at"`
	UpdatedAt   time.Time      `db:"updated_at"`
	Environment types.JSONText `db:"environment"`
	Secrets     types.JSONText `db:"secrets"`
}

func (Function) EnvironmentJSON added in v1.6.0

func (f Function) EnvironmentJSON() (map[string]string, error)

func (Function) SecretsJSON added in v1.6.0

func (f Function) SecretsJSON() (map[string]string, error)

type Invocation

type Invocation struct {
	ID           string           `db:"id"`
	Status       InvocationStatus `db:"status"`
	FunctionName string           `db:"function_name"`
	FunctionID   sql.NullString   `db:"function_id"`
	Image        string           `db:"image"`
	ClientName   string           `db:"client_name"`
	Input        sql.NullString   `db:"input"`
	Output       sql.NullString   `db:"output"`
	ErrorMessage sql.NullString   `db:"error_message"`
	CreatedAt    time.Time        `db:"created_at"`
	UpdatedAt    time.Time        `db:"updated_at"`
	StartedAt    *time.Time       `db:"started_at"`
	EndedAt      *time.Time       `db:"ended_at"`
}

type InvocationStatus

type InvocationStatus string

type User added in v1.3.0

type User struct {
	ID                string         `db:"id"`
	Username          string         `db:"username"`
	EncryptedPassword string         `db:"encrypted_password"`
	Name              sql.NullString `db:"name"`
	Email             sql.NullString `db:"email"`
	CreatedAt         time.Time      `db:"created_at"`
	UpdatedAt         time.Time      `db:"updated_at"`
}

Jump to

Keyboard shortcuts

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