model

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const PermV2InstanceTopic = "import-instances"

Variables

View Source
var ErrBadRequest = errors.New("bad request")
View Source
var ErrForbidden = fmt.Errorf("forbidden")
View Source
var ErrInternalServerError = errors.New("internal server error")
View Source
var ErrNotFound = fmt.Errorf("not found")

Functions

func GetError added in v0.0.28

func GetError(code int) error

func GetStatusCode added in v0.0.28

func GetStatusCode(err error) int

func SetDefaultPermissions added in v0.0.15

func SetDefaultPermissions(instance Instance, permissions permV2Client.ResourcePermissions)

Types

type AuthAction

type AuthAction string
const (
	READ         AuthAction = "r"
	WRITE        AuthAction = "w"
	EXECUTE      AuthAction = "x"
	ADMINISTRATE AuthAction = "a"
)

func (AuthAction) String

func (this AuthAction) String() string

type ImportType

type ImportType struct {
	Id             string             `json:"id"`
	Name           string             `json:"name"`
	Description    string             `json:"description"`
	Image          string             `json:"image"`
	DefaultRestart bool               `json:"default_restart"`
	Configs        []ImportTypeConfig `json:"configs"`
	Owner          string             `json:"owner"`
}

type ImportTypeConfig

type ImportTypeConfig struct {
	Name         string      `json:"name"`
	Description  string      `json:"description"`
	Type         Type        `json:"type"`
	DefaultValue interface{} `json:"default_value"`
}

type Instance

type Instance struct {
	Id           string           `json:"id"`
	Name         string           `json:"name"`
	ImportTypeId string           `json:"import_type_id"`
	Image        string           `json:"image"`
	KafkaTopic   string           `json:"kafka_topic"`
	Configs      []InstanceConfig `json:"configs"`
	Restart      *bool            `json:"restart"`
	ServiceId    string           `json:"-"`
	Owner        string           `json:"-"`
	CreatedAt    time.Time        `json:"created_at"`
	UpdatedAt    time.Time        `json:"updated_at"`
	Generated    bool             `json:"generated"`
}

type InstanceConfig

type InstanceConfig struct {
	Name        string      `json:"name"`
	Value       interface{} `json:"value"`
	ValueString *string     `json:"-"`
}

type Instances

type Instances []Instance

type Type

type Type string
const (
	String  Type = "https://schema.org/Text"
	Integer Type = "https://schema.org/Integer"
	Float   Type = "https://schema.org/Float"
	Boolean Type = "https://schema.org/Boolean"

	List      Type = "https://schema.org/ItemList"
	Structure Type = "https://schema.org/StructuredValue"
)

Jump to

Keyboard shortcuts

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