model

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HeaderRequestID = "X-Request-ID"
	HeaderApiVer    = "X-Api-Version"
	HeaderSrvName   = "X-Service"
)
View Source
const (
	CoreServicesPath   = "core-services"
	RestartPath        = "restart"
	RestrictedPath     = "restricted"
	EndpointsPath      = "endpoints"
	EndpointsBatchPath = "endpoints-batch"
	AliasPath          = "alias"
	CleanupPath        = "cleanup"
	ImagesPath         = "images"
	LogsPath           = "logs"
	JobsPath           = "jobs"
	JobsCancelPath     = "cancel"
	SrvInfoPath        = "info"
)

Variables

This section is empty.

Functions

func NewInternalError

func NewInternalError(err error) error

func NewInvalidInputError

func NewInvalidInputError(err error) error

func NewNotAllowedError added in v0.0.3

func NewNotAllowedError(err error) error

func NewNotFoundError

func NewNotFoundError(err error) error

Types

type CoreService added in v0.0.3

type CoreService struct {
	Name      string       `json:"name"`
	Container SrvContainer `json:"container"`
	Image     string       `json:"image"`
}

type Endpoint

type Endpoint struct {
	ID       string       `json:"id"`
	ParentID string       `json:"parent_id"`
	Type     EndpointType `json:"type"`
	Location string       `json:"location,omitempty"`
	EndpointBase
}

type EndpointAliasReq added in v0.0.3

type EndpointAliasReq struct {
	Path string `json:"path"`
}

type EndpointBase added in v0.0.3

type EndpointBase struct {
	Ref       string            `json:"ref"`
	Host      string            `json:"host"`
	Port      *int              `json:"port"`
	IntPath   string            `json:"int_path"`
	ExtPath   string            `json:"ext_path"`
	ProxyConf ProxyConfig       `json:"proxy_conf"`
	StringSub StringSub         `json:"string_sub"`
	Labels    map[string]string `json:"labels"`
}

type EndpointFilter

type EndpointFilter struct {
	IDs    []string
	Type   EndpointType
	Ref    string
	Labels map[string]string
}

type EndpointType

type EndpointType = int
const (
	StandardEndpoint EndpointType = iota + 1
	AliasEndpoint
	DefaultGuiEndpoint
)

type InternalError

type InternalError struct {
	// contains filtered or unexported fields
}

func (*InternalError) Error

func (e *InternalError) Error() string

func (*InternalError) Unwrap

func (e *InternalError) Unwrap() error

type InvalidInputError

type InvalidInputError struct {
	// contains filtered or unexported fields
}

func (*InvalidInputError) Error

func (e *InvalidInputError) Error() string

func (*InvalidInputError) Unwrap

func (e *InvalidInputError) Unwrap() error

type Log added in v0.8.1

type Log struct {
	ID          string `json:"id"`
	ServiceName string `json:"service_name"`
}

type NotAllowedError added in v0.0.3

type NotAllowedError struct {
	// contains filtered or unexported fields
}

func (*NotAllowedError) Error added in v0.0.3

func (e *NotAllowedError) Error() string

func (*NotAllowedError) Unwrap added in v0.0.3

func (e *NotAllowedError) Unwrap() error

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type ProxyConfig added in v0.7.0

type ProxyConfig struct {
	Headers     map[string]string `json:"headers"`
	WebSocket   bool              `json:"websocket"`
	ReadTimeout time.Duration     `json:"read_timeout"`
}

type SrvContainer added in v0.0.3

type SrvContainer struct {
	ID    *string `json:"id"`
	Name  string  `json:"name"`
	State *string `json:"state"`
}

type StringSub added in v0.6.0

type StringSub struct {
	ReplaceOnce bool              `json:"replace_once"` // false -> replace repeatedly
	MimeTypes   []string          `json:"mime_types"`   // empty -> all types
	Filters     map[string]string `json:"filters"`      // orgStr:newStr
}

Jump to

Keyboard shortcuts

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