model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	String  = models.String
	Integer = models.Integer
	Float   = models.Float
	Boolean = models.Boolean

	List      = models.List
	Structure = models.Structure
)
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 ContentVariable added in v0.2.1

type ContentVariable = models.ImportContentVariable

ContentVariable describes the output of an import type. It carries AspectIds; the deprecated AspectId is an alias for a single entry of that list. Both are filled by the import repository on read, so a reader here has to interpret only one of them and needs no folding of its own.

type ImportType

type ImportType = models.ImportType

type ImportTypeConfig

type ImportTypeConfig = models.ImportTypeConfig

ImportTypeConfig declares a config of an import type. It is the counterpart of InstanceConfig, which holds the value an instance actually runs with.

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"`
	// Status is filled from the deployment backend on read and is never persisted.
	Status *InstanceStatus `json:"status,omitempty" bson:"-"`
	// Baggage is the OpenTelemetry context of the caller that created this instance.
	// It is set from the request rather than from the payload -- a value sent in the
	// body is ignored -- and handed to the container as pod labels and as the BAGGAGE
	// environment variable, so that every log line about this import can be traced
	// back to that context.
	Baggage map[string]string `json:"baggage,omitempty"`
}

Instance is an import instance. Its api representation is the shared models.Import, widened by what this service keeps about a deployment. It is not aliased onto that type: the extra fields would have to be embedded, and an embedded type is no longer addressable by a field literal, which is how callers of this service's client build an instance.

type InstanceConfig

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

type InstanceStatus added in v0.1.0

type InstanceStatus struct {
	Running       bool   `json:"running"`
	Transitioning bool   `json:"transitioning"`
	Message       string `json:"message,omitempty"`
}

InstanceStatus describes the current state of the container running an instance.

type Instances

type Instances []Instance

type Type

type Type = models.Type

Jump to

Keyboard shortcuts

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