resource

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: EPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FogTypeIntMap = map[int]string{
	0: "auto",
	1: "x86",
	2: "arm",
}

FogTypeIntMap map Controller fog type to human readable fog type

View Source
var FogTypeStringMap = map[string]int64{
	"auto": 0,
	"x86":  1,
	"arm":  2,
}

FogTypeStringMap map human readable fog type to Controller fog type

Functions

func IsNoControlPlaneError

func IsNoControlPlaneError(err error) bool

Types

type Agent

type Agent interface {
	GetName() string
	GetUUID() string
	GetHost() string
	GetCreatedTime() string
	GetConfig() *AgentConfiguration
	GetControllerEndpoint() string
	SetName(string)
	SetUUID(string)
	SetHost(string)
	SetCreatedTime(string)
	SetConfig(*AgentConfiguration)
	Sanitize() error
	Clone() Agent
}

type AgentConfiguration

type AgentConfiguration struct {
	Name                      string  `json:"name,omitempty" yaml:"name"`
	Location                  string  `json:"location,omitempty" yaml:"location"`
	Latitude                  float64 `json:"latitude,omitempty" yaml:"latitude"`
	Longitude                 float64 `json:"longitude,omitempty" yaml:"longitude"`
	Description               string  `json:"description,omitempty" yaml:"description"`
	FogType                   *string `json:"fogType,omitempty" yaml:"agentType"`
	client.AgentConfiguration `yaml:",inline"`
}

AgentConfiguration contains configuration information for a deployed agent

type AgentInfo added in v1.4.0

type AgentInfo struct {
	AgentConfiguration
	AgentStatus
}

type AgentScripts

type AgentScripts struct {
	install.AgentProcedures `yaml:",inline"`
	Directory               string `yaml:"dir"` // Location of scripts
}

type AgentStatus added in v1.4.0

type AgentStatus struct {
	LastActive            int64   `json:"lastActive" yaml:"lastActive"`
	DaemonStatus          string  `json:"daemonStatus" yaml:"daemonStatus"`
	SecurityStatus        string  `json:"securityStatus" yaml:"securityStatus"`
	SecurityViolationInfo string  `json:"securityViolationInfo" yaml:"securityViolationInfo"`
	WarningMessage        string  `json:"warningMessage" yaml:"warningMessage"`
	UptimeMs              int64   `json:"daemonOperatingDuration" yaml:"uptime"`
	MemoryUsage           float64 `json:"memoryUsage" yaml:"memoryUsage"`
	DiskUsage             float64 `json:"diskUsage" yaml:"diskUsage"`
	CPUUsage              float64 `json:"cpuUsage" yaml:"cpuUsage"`
	SystemAvailableMemory float64 `json:"systemAvailableMemory" yaml:"systemAvailableMemory"`
	SystemAvailableDisk   float64 `json:"systemAvailableDisk" yaml:"systemAvailableDisk"`
	SystemTotalCPU        float64 `json:"systemTotalCPU" yaml:"systemTotalCPU"`
	MemoryViolation       string  `json:"memoryViolation" yaml:"memoryViolation"`
	DiskViolation         string  `json:"diskViolation" yaml:"diskViolation"`
	CPUViolation          string  `json:"cpuViolation" yaml:"cpuViolation"`
	RepositoryStatus      string  `json:"repositoryStatus" yaml:"repositoryStatus"`
	LastStatusTimeMsUTC   int64   `json:"lastStatusTime" yaml:"lastStatusTime"`
	IPAddress             string  `json:"ipAddress" yaml:"ipAddress"`
	IPAddressExternal     string  `json:"ipAddressExternal" yaml:"ipAddressExternal"`
	ProcessedMessaged     int64   `json:"processedMessages" yaml:"ProcessedMessages"`
	MessageSpeed          float64 `json:"messageSpeed" yaml:"messageSpeed"`
	LastCommandTimeMsUTC  int64   `json:"lastCommandTime" yaml:"lastCommandTime"`
	Version               string  `json:"version" yaml:"version"`
	IsReadyToUpgrade      bool    `json:"isReadyToUpgrade" yaml:"isReadyToUpgrade"`
	IsReadyToRollback     bool    `json:"isReadyToRollback" yaml:"isReadyToRollback"`
	Tunnel                string  `json:"tunnel" yaml:"tunnel"`
	VolumeMounts          []VolumeMount
	GpsStatus             string `json:"gpsStatus" yaml:"gpsStatus"`
}

type Application

type Application = apps.Application

type ApplicationTemplate

type ApplicationTemplate = apps.ApplicationTemplate

type Auth added in v1.2.0

type Auth struct {
	URL              string `yaml:"url"`
	Realm            string `yaml:"realm"`
	SSL              string `yaml:"ssl"`
	RealmKey         string `yaml:"realmKey"`
	ControllerClient string `yaml:"controllerClient"`
	ControllerSecret string `yaml:"controllerSecret"`
	ViewerClient     string `yaml:"viewerClient"`
}

type CACreateRequest added in v1.4.0

type CACreateRequest struct {
	Name       string `json:"name" yaml:"name"`
	Subject    string `json:"subject,omitempty" yaml:"subject,omitempty"`
	Expiration int    `json:"expiration,omitempty" yaml:"expiration,omitempty"`
	Type       string `json:"type" yaml:"type" yaml:"type"`
	SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
}

type CAInfo added in v1.4.0

type CAInfo struct {
	// Name         string          `json:"name"`
	Subject      string    `json:"subject" yaml:"subject"`
	IsCA         bool      `json:"isCA" yaml:"isCA"`
	ValidFrom    time.Time `json:"validFrom" yaml:"validFrom"`
	ValidTo      time.Time `json:"validTo" yaml:"validTo"`
	SerialNumber string    `json:"serialNumber" yaml:"serialNumber"`
	Certificate  string    `json:"certificate" yaml:"certificate"`
	PrivateKey   string    `json:"privateKey" yaml:"privateKey"`
}

type CertificateCACreateResponse added in v1.4.0

type CertificateCACreateResponse struct {
	Name      string    `json:"name" yaml:"name"`
	Subject   string    `json:"subject" yaml:"subject"`
	Type      string    `json:"type" yaml:"type"`
	ValidFrom time.Time `json:"validFrom" yaml:"validFrom"`
	ValidTo   time.Time `json:"validTo" yaml:"validTo"`
}

type CertificateChainItem added in v1.4.0

type CertificateChainItem struct {
	Name    string `json:"name" yaml:"name"`
	Subject string `json:"subject" yaml:"subject"`
}

type CertificateCreateCA added in v1.4.0

type CertificateCreateCA struct {
	Type       string `json:"type" yaml:"type"`
	SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
}

type CertificateCreateRequest added in v1.4.0

type CertificateCreateRequest struct {
	Name       string              `json:"name" yaml:"name"`
	Subject    string              `json:"subject" yaml:"subject"`
	Hosts      string              `json:"hosts" yaml:"hosts"`
	Expiration int                 `json:"expiration,omitempty" yaml:"expiration,omitempty"`
	CA         CertificateCreateCA `json:"ca" yaml:"ca"`
}

Certificate Types

type CertificateCreateResponse added in v1.4.0

type CertificateCreateResponse struct {
	Name      string    `json:"name" yaml:"name"`
	Subject   string    `json:"subject" yaml:"subject"`
	Hosts     string    `json:"hosts" yaml:"hosts"`
	ValidFrom time.Time `json:"validFrom" yaml:"validFrom"`
	ValidTo   time.Time `json:"validTo" yaml:"validTo"`
	CAName    string    `json:"caName" yaml:"caName"`
}

type CertificateData added in v1.4.0

type CertificateData struct {
	Certificate string `json:"certificate" yaml:"certificate"`
	PrivateKey  string `json:"privateKey" yaml:"privateKey"`
}

type CertificateInfo added in v1.4.0

type CertificateInfo struct {
	// Name             string                 `json:"name"`
	Subject      string    `json:"subject" yaml:"subject"`
	Hosts        string    `json:"hosts" yaml:"hosts"`
	IsCA         bool      `json:"isCA" yaml:"isCA"`
	ValidFrom    time.Time `json:"validFrom" yaml:"validFrom"`
	ValidTo      time.Time `json:"validTo" yaml:"validTo"`
	SerialNumber string    `json:"serialNumber" yaml:"serialNumber"`
	CAName       *string   `json:"caName" yaml:"caName"`
	// CertificateChain []CertificateChainItem `json:"certificateChain" yaml:"certificateChain"`
	DaysRemaining int    `json:"daysRemaining" yaml:"daysRemaining"`
	IsExpired     bool   `json:"isExpired" yaml:"isExpired"`
	Certificate   string `json:"certificate" yaml:"certificate"`
	PrivateKey    string `json:"privateKey" yaml:"privateKey"`
}

type ClusterService added in v1.4.0

type ClusterService struct {
	Name            string   `yaml:"name,omitempty"`
	Tags            []string `yaml:"tags,omitempty"`
	Type            string   `yaml:"type,omitempty"`
	Resource        string   `yaml:"resource,omitempty"`
	TargetPort      int      `yaml:"targetPort,omitempty"`
	BridgePort      int      `yaml:"bridgePort,omitempty"`
	DefaultBridge   string   `yaml:"defaultBridge,omitempty"`
	K8sType         string   `yaml:"k8sType,omitempty"`
	ServiceEndpoint string   `yaml:"serviceEndpoint,omitempty"`
	ServicePort     int      `yaml:"servicePort,omitempty"`
}

type ConfigMap added in v1.4.0

type ConfigMap struct {
	Name      string            `yaml:"name,omitempty"`
	Immutable bool              `yaml:"immutable"`
	Data      map[string]string `yaml:"data,omitempty"`
}

type Container

type Container struct {
	Image       string      `yaml:"image,omitempty"`
	Credentials Credentials `yaml:"credentials,omitempty"` // Optional credentials if needed to pull images
}

type ControlPlane

type ControlPlane interface {
	GetUser() IofogUser
	// UpdateUserSubscriptionKey(string) IofogUser
	UpdateUserTokens(string, string) IofogUser
	GetControllers() []Controller
	GetController(string) (Controller, error)
	GetEndpoint() (string, error)
	UpdateController(Controller) error
	AddController(Controller) error
	DeleteController(string) error
	Sanitize() error
	Clone() ControlPlane
}

type Controller

type Controller interface {
	GetName() string
	GetEndpoint() string
	GetCreatedTime() string
	SetName(string)
	Sanitize() error
	Clone() Controller
}

type ControllerIngress added in v1.2.5

type ControllerIngress struct {
	Annotations      map[string]string `yaml:"annotations,omitempty"`
	IngressClassName string            `yaml:"ingressClassName,omitempty"`
	Host             string            `yaml:"host,omitempty"`
	SecretName       string            `yaml:"secretName,omitempty"`
}

type ControllerScripts added in v1.4.6

type ControllerScripts struct {
	install.ControllerProcedures `yaml:",inline"`
	Directory                    string `yaml:"dir"` // Location of scripts
}

type Credentials

type Credentials struct {
	User     string `yaml:"user,omitempty"`
	Password string `yaml:"password,omitempty"`
}

Credentials credentials used to log into docker when deploying a local stack

type Database

type Database struct {
	Provider     string  `yaml:"provider,omitempty"`
	Host         string  `yaml:"host,omitempty"`
	Port         int     `yaml:"port,omitempty"`
	User         string  `yaml:"user,omitempty"`
	Password     string  `yaml:"password,omitempty"`
	DatabaseName string  `yaml:"databaseName,omitempty"`
	SSL          *bool   `yaml:"ssl,omitempty"`
	CA           *string `yaml:"ca,omitempty"`
}

type Display

type Display = client.EdgeResourceDisplay

type EdgeResource

type EdgeResource struct {
	Name              string
	Version           string                     `yaml:"version"`
	Description       string                     `yaml:"description"`
	InterfaceProtocol string                     `yaml:"interfaceProtocol"`
	Interface         *EdgeResourceHTTPInterface `yaml:"interface,omitempty"` // TODO: Make this generic to support multiple interfaces protocols
	Display           *Display                   `yaml:"display,omitempty"`
	OrchestrationTags []string                   `yaml:"orchestrationTags"`
	Custom            map[string]interface{}     `yaml:"custom"`
}

type EdgeResourceHTTPInterface

type EdgeResourceHTTPInterface = client.HTTPEdgeResource

type Events added in v1.4.8

type Events struct {
	AuditEnabled     *bool `yaml:"auditEnabled,omitempty"`
	RetentionDays    int   `yaml:"retentionDays,omitempty"`
	CleanupInterval  int   `yaml:"cleanupInterval,omitempty"`
	CaptureIpAddress *bool `yaml:"captureIpAddress,omitempty"`
}

type HTTPEndpoint

type HTTPEndpoint = client.HTTPEndpoint

type Https added in v1.4.0

type Https struct {
	Enabled *bool  `yaml:"enabled,omitempty"`
	CACert  string `yaml:"caCert,omitempty"`  // base64 encoded
	TLSCert string `yaml:"tlsCert,omitempty"` // base64 encoded
	TLSKey  string `yaml:"tlsKey,omitempty"`  // base64 encoded
}

type Ingress added in v1.2.5

type Ingress struct {
	Address string `yaml:"address,omitempty"`
}

type Ingresses added in v1.2.5

type Ingresses struct {
	Controller ControllerIngress `yaml:"controller,omitempty"`
	Router     RouterIngress     `yaml:"router,omitempty"`
}

type IofogUser

type IofogUser struct {
	Name            string `yaml:"name,omitempty"`
	Surname         string `yaml:"surname,omitempty"`
	Email           string `yaml:"email,omitempty"`
	Password        string `yaml:"password,omitempty"`
	SubscriptionKey string `yaml:"subscriptionKey,omitempty"`
	AccessToken     string `yaml:"accessToken,omitempty"`
	RefreshToken    string `yaml:"refreshToken,omitempty"`
}

IofogUser contains information about users registered against a controller

func (*IofogUser) EncodePassword

func (user *IofogUser) EncodePassword()

func (IofogUser) GetRawPassword

func (user IofogUser) GetRawPassword() string

type K8SControllerConfig added in v1.4.0

type K8SControllerConfig struct {
	PidBaseDir    string `yaml:"pidBaseDir,omitempty"`
	EcnViewerPort int    `yaml:"ecnViewerPort,omitempty"`
	EcnViewerURL  string `yaml:"ecnViewerUrl,omitempty"`
	LogLevel      string `yaml:"logLevel,omitempty"`
	Https         *bool  `yaml:"https,omitempty"`
	SecretName    string `yaml:"secretName,omitempty"`
}

type KubeImages

type KubeImages struct {
	PullSecret    string `yaml:"pullSecret,omitempty"`
	Controller    string `yaml:"controller,omitempty"`
	Operator      string `yaml:"operator,omitempty"`
	Router        string `yaml:"router,omitempty"`
	RouterAdaptor string `yaml:"routerAdaptor,omitempty"`
}

type KubernetesControlPlane

type KubernetesControlPlane struct {
	KubeConfig     string                 `yaml:"config"`
	IofogUser      IofogUser              `yaml:"iofogUser"`
	ControllerPods []KubernetesController `yaml:"controllerPods,omitempty"`
	Database       Database               `yaml:"database"`
	Auth           Auth                   `yaml:"auth"`
	Events         Events                 `yaml:"events,omitempty"`
	Services       Services               `yaml:"services,omitempty"`
	Replicas       Replicas               `yaml:"replicas,omitempty"`
	Images         KubeImages             `yaml:"images,omitempty"`
	Endpoint       string                 `yaml:"endpoint,omitempty"`
	Controller     K8SControllerConfig    `yaml:"controller,omitempty"`
	Ingresses      Ingresses              `yaml:"ingresses,omitempty"`
}

func UnmarshallKubernetesControlPlane

func UnmarshallKubernetesControlPlane(file []byte) (controlPlane KubernetesControlPlane, err error)

func (*KubernetesControlPlane) AddController

func (cp *KubernetesControlPlane) AddController(baseController Controller) error

func (*KubernetesControlPlane) Clone

func (*KubernetesControlPlane) DeleteController

func (cp *KubernetesControlPlane) DeleteController(name string) error

func (*KubernetesControlPlane) GetController

func (cp *KubernetesControlPlane) GetController(name string) (ret Controller, err error)

func (*KubernetesControlPlane) GetControllers

func (cp *KubernetesControlPlane) GetControllers() (controllers []Controller)

func (*KubernetesControlPlane) GetEndpoint

func (cp *KubernetesControlPlane) GetEndpoint() (string, error)

func (*KubernetesControlPlane) GetUser

func (cp *KubernetesControlPlane) GetUser() IofogUser

func (*KubernetesControlPlane) Sanitize

func (cp *KubernetesControlPlane) Sanitize() (err error)

func (*KubernetesControlPlane) UpdateController

func (cp *KubernetesControlPlane) UpdateController(baseController Controller) error

func (*KubernetesControlPlane) UpdateUserTokens added in v1.3.2

func (cp *KubernetesControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser

func (*KubernetesControlPlane) ValidateKubeConfig

func (cp *KubernetesControlPlane) ValidateKubeConfig() error

type KubernetesController

type KubernetesController struct {
	PodName  string `yaml:"podName"`
	Endpoint string `yaml:"endpoint"`
	Created  string `yaml:"created,omitempty"`
	Status   string `yaml:"status,omitempty"`
}

func (*KubernetesController) Clone

func (ctrl *KubernetesController) Clone() Controller

func (*KubernetesController) GetCreatedTime

func (ctrl *KubernetesController) GetCreatedTime() string

func (*KubernetesController) GetEndpoint

func (ctrl *KubernetesController) GetEndpoint() string

func (*KubernetesController) GetName

func (ctrl *KubernetesController) GetName() string

func (*KubernetesController) Sanitize

func (ctrl *KubernetesController) Sanitize() error

func (*KubernetesController) SetName

func (ctrl *KubernetesController) SetName(name string)

type LocalAgent

type LocalAgent struct {
	Name               string              `yaml:"name,omitempty"`
	UUID               string              `yaml:"uuid,omitempty"`
	Container          Container           `yaml:"container,omitempty"`
	Created            string              `yaml:"created,omitempty"`
	Host               string              `yaml:"host,omitempty"`
	Config             *AgentConfiguration `yaml:"config,omitempty"`
	ControllerEndpoint string              `yaml:"controllerEndpoint,omitempty"`
}

func UnmarshallLocalAgent

func UnmarshallLocalAgent(file []byte) (agent LocalAgent, err error)

func (*LocalAgent) Clone

func (agent *LocalAgent) Clone() Agent

func (*LocalAgent) GetConfig

func (agent *LocalAgent) GetConfig() *AgentConfiguration

func (*LocalAgent) GetControllerEndpoint

func (agent *LocalAgent) GetControllerEndpoint() string

func (*LocalAgent) GetCreatedTime

func (agent *LocalAgent) GetCreatedTime() string

func (*LocalAgent) GetHost

func (agent *LocalAgent) GetHost() string

func (*LocalAgent) GetName

func (agent *LocalAgent) GetName() string

func (*LocalAgent) GetUUID

func (agent *LocalAgent) GetUUID() string

func (*LocalAgent) Sanitize

func (agent *LocalAgent) Sanitize() error

func (*LocalAgent) SetConfig

func (agent *LocalAgent) SetConfig(config *AgentConfiguration)

func (*LocalAgent) SetCreatedTime

func (agent *LocalAgent) SetCreatedTime(time string)

func (*LocalAgent) SetHost

func (agent *LocalAgent) SetHost(host string)

func (*LocalAgent) SetName

func (agent *LocalAgent) SetName(name string)

func (*LocalAgent) SetUUID

func (agent *LocalAgent) SetUUID(uuid string)

type LocalControlPlane

type LocalControlPlane struct {
	IofogUser  IofogUser        `yaml:"iofogUser"`
	Controller *LocalController `yaml:"controller,omitempty"`
	Database   Database         `yaml:"database"`
	Auth       Auth             `yaml:"auth"`
	Events     Events           `yaml:"events,omitempty"`
}

func UnmarshallLocalControlPlane

func UnmarshallLocalControlPlane(file []byte) (controlPlane LocalControlPlane, err error)

func (*LocalControlPlane) AddController

func (cp *LocalControlPlane) AddController(baseController Controller) error

func (*LocalControlPlane) Clone

func (cp *LocalControlPlane) Clone() ControlPlane

func (*LocalControlPlane) DeleteController

func (cp *LocalControlPlane) DeleteController(string) error

func (*LocalControlPlane) GetController

func (cp *LocalControlPlane) GetController(name string) (Controller, error)

func (*LocalControlPlane) GetControllers

func (cp *LocalControlPlane) GetControllers() []Controller

func (*LocalControlPlane) GetEndpoint

func (cp *LocalControlPlane) GetEndpoint() (string, error)

func (*LocalControlPlane) GetUser

func (cp *LocalControlPlane) GetUser() IofogUser

func (*LocalControlPlane) Sanitize

func (cp *LocalControlPlane) Sanitize() error

func (*LocalControlPlane) UpdateController

func (cp *LocalControlPlane) UpdateController(baseController Controller) error

func (*LocalControlPlane) UpdateUserTokens added in v1.3.2

func (cp *LocalControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser

type LocalController

type LocalController struct {
	Name      string    `yaml:"name"`
	Endpoint  string    `yaml:"endpoint"`
	Container Container `yaml:"container"`
	Created   string    `yaml:"created,omitempty"`
}

func UnmarshallLocalController

func UnmarshallLocalController(file []byte) (controller LocalController, err error)

func (*LocalController) Clone

func (ctrl *LocalController) Clone() Controller

func (*LocalController) GetCreatedTime

func (ctrl *LocalController) GetCreatedTime() string

func (*LocalController) GetEndpoint

func (ctrl *LocalController) GetEndpoint() string

func (*LocalController) GetName

func (ctrl *LocalController) GetName() string

func (*LocalController) Sanitize

func (ctrl *LocalController) Sanitize() error

func (*LocalController) SetName

func (ctrl *LocalController) SetName(name string)

type Microservice

type Microservice = apps.Microservice

type Namespace

type Namespace struct {
	Name                   string                  `yaml:"name,omitempty"`
	KubernetesControlPlane *KubernetesControlPlane `yaml:"k8sControlPlane,omitempty"`
	RemoteControlPlane     *RemoteControlPlane     `yaml:"remoteControlPlane,omitempty"`
	LocalControlPlane      *LocalControlPlane      `yaml:"localControlPlane,omitempty"`
	LocalAgents            []LocalAgent            `yaml:"localAgents,omitempty"`
	RemoteAgents           []RemoteAgent           `yaml:"remoteAgents,omitempty"`
	Volumes                []Volume                `yaml:"volumes,omitempty"`
	Created                string                  `yaml:"created,omitempty"`
	// contains filtered or unexported fields
}

Namespace is the fundamental type for managing an ECN's resources. Namespace's public getters will all return copies of resources. Namespace's API is intended to be used in parallel, hence the mutex.

func (*Namespace) AddAgent

func (ns *Namespace) AddAgent(baseAgent Agent) error

func (*Namespace) AddVolume

func (ns *Namespace) AddVolume(volume *Volume) error

func (*Namespace) Clone

func (ns *Namespace) Clone() *Namespace

func (*Namespace) DeleteAgent

func (ns *Namespace) DeleteAgent(name string) error

func (*Namespace) DeleteAgents

func (ns *Namespace) DeleteAgents()

func (*Namespace) DeleteControlPlane

func (ns *Namespace) DeleteControlPlane()

func (*Namespace) DeleteController

func (ns *Namespace) DeleteController(name string) (err error)

func (*Namespace) DeleteVolume

func (ns *Namespace) DeleteVolume(name string) error

func (*Namespace) GetAgent

func (ns *Namespace) GetAgent(name string) (Agent, error)

func (*Namespace) GetAgents

func (ns *Namespace) GetAgents() (agents []Agent)

func (*Namespace) GetControlPlane

func (ns *Namespace) GetControlPlane() (ControlPlane, error)

GetControlPlane will return a deep copy of the Namespace's ControlPlane

func (*Namespace) GetControllers

func (ns *Namespace) GetControllers() []Controller

GetControllers will return a slice of deep copied Controllers

func (*Namespace) GetVolume

func (ns *Namespace) GetVolume(name string) (volume Volume, err error)

func (*Namespace) GetVolumes

func (ns *Namespace) GetVolumes() (volumes []Volume)

func (*Namespace) SetControlPlane

func (ns *Namespace) SetControlPlane(baseControlPlane ControlPlane)

func (*Namespace) UpdateAgent

func (ns *Namespace) UpdateAgent(baseAgent Agent) error

func (*Namespace) UpdateVolume

func (ns *Namespace) UpdateVolume(volume *Volume)

type NoControlPlaneError

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

func NewNoControlPlaneError

func NewNoControlPlaneError(namespace string) NoControlPlaneError

func (NoControlPlaneError) Error

func (err NoControlPlaneError) Error() string

type NoKubeConfigError

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

func NewNoKubeConfigError

func NewNoKubeConfigError(resource string) *NoKubeConfigError

func (*NoKubeConfigError) Error

func (err *NoKubeConfigError) Error() string

type NoSSHConfigError

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

func NewNoSSHConfigError

func NewNoSSHConfigError(resource string) *NoSSHConfigError

func (*NoSSHConfigError) Error

func (err *NoSSHConfigError) Error() string

type OfflineImage added in v1.4.8

type OfflineImage struct {
	Name     string            `json:"name" yaml:"name"`
	X86Image string            `json:"x86,omitempty" yaml:"x86,omitempty"`
	ArmImage string            `json:"arm,omitempty" yaml:"arm,omitempty"`
	Auth     *OfflineImageAuth `json:"auth,omitempty" yaml:"auth,omitempty"`
	Agents   []string          `json:"agent,omitempty" yaml:"agent,omitempty"`
}

type OfflineImageAuth added in v1.4.8

type OfflineImageAuth struct {
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
	Password string `json:"password,omitempty" yaml:"password,omitempty"`
}

type Package

type Package struct {
	Version   string `yaml:"version,omitempty"`
	Container RemoteContainer
}

type Registry

type Registry struct {
	URL          *string `yaml:"url"`
	Private      *bool   `yaml:"private"`
	Username     *string `yaml:"username"`
	Password     *string `yaml:"password"`
	Email        *string `yaml:"email"`
	RequiresCert *bool   `yaml:"requiresCert"`
	Certificate  *string `yaml:"certificate,omitempty"`
	ID           int     `yaml:"id"`
}

type RemoteAgent

type RemoteAgent struct {
	Name               string              `yaml:"name"`
	Host               string              `yaml:"host"`
	SSH                SSH                 `yaml:"ssh"`
	UUID               string              `yaml:"uuid,omitempty"`
	Created            string              `yaml:"created,omitempty"`
	Package            Package             `yaml:"package,omitempty"`
	Config             *AgentConfiguration `yaml:"config,omitempty"`
	Scripts            *AgentScripts       `yaml:"scripts,omitempty"`
	ControllerEndpoint string              `yaml:"controllerEndpoint,omitempty"`
}

func UnmarshallRemoteAgent

func UnmarshallRemoteAgent(file []byte) (agent RemoteAgent, err error)

func (*RemoteAgent) Clone

func (agent *RemoteAgent) Clone() Agent

func (*RemoteAgent) GetConfig

func (agent *RemoteAgent) GetConfig() *AgentConfiguration

func (*RemoteAgent) GetControllerEndpoint

func (agent *RemoteAgent) GetControllerEndpoint() string

func (*RemoteAgent) GetCreatedTime

func (agent *RemoteAgent) GetCreatedTime() string

func (*RemoteAgent) GetHost

func (agent *RemoteAgent) GetHost() string

func (*RemoteAgent) GetName

func (agent *RemoteAgent) GetName() string

func (*RemoteAgent) GetUUID

func (agent *RemoteAgent) GetUUID() string

func (*RemoteAgent) Sanitize

func (agent *RemoteAgent) Sanitize() (err error)

func (*RemoteAgent) SetConfig

func (agent *RemoteAgent) SetConfig(config *AgentConfiguration)

func (*RemoteAgent) SetCreatedTime

func (agent *RemoteAgent) SetCreatedTime(time string)

func (*RemoteAgent) SetHost

func (agent *RemoteAgent) SetHost(host string)

func (*RemoteAgent) SetName

func (agent *RemoteAgent) SetName(name string)

func (*RemoteAgent) SetUUID

func (agent *RemoteAgent) SetUUID(uuid string)

func (*RemoteAgent) ValidateSSH

func (agent *RemoteAgent) ValidateSSH() error

type RemoteContainer added in v1.3.6

type RemoteContainer struct {
	Image string `yaml:"image,omitempty"`
}

type RemoteControlPlane

type RemoteControlPlane struct {
	IofogUser           IofogUser                 `yaml:"iofogUser"`
	Controllers         []RemoteController        `yaml:"controllers"`
	Database            Database                  `yaml:"database"`
	Auth                Auth                      `yaml:"auth"`
	Events              Events                    `yaml:"events,omitempty"`
	Package             Package                   `yaml:"package,omitempty"`
	SystemMicroservices RemoteSystemMicroservices `yaml:"systemMicroservices,omitempty"`
	Endpoint            string                    `yaml:"endpoint,omitempty"`
}

func UnmarshallRemoteControlPlane

func UnmarshallRemoteControlPlane(file []byte) (controlPlane RemoteControlPlane, err error)

func (*RemoteControlPlane) AddController

func (cp *RemoteControlPlane) AddController(baseController Controller) error

func (*RemoteControlPlane) Clone

func (cp *RemoteControlPlane) Clone() ControlPlane

func (*RemoteControlPlane) DeleteController

func (cp *RemoteControlPlane) DeleteController(name string) error

func (*RemoteControlPlane) GetController

func (cp *RemoteControlPlane) GetController(name string) (ret Controller, err error)

func (*RemoteControlPlane) GetControllers

func (cp *RemoteControlPlane) GetControllers() (controllers []Controller)

func (*RemoteControlPlane) GetEndpoint

func (cp *RemoteControlPlane) GetEndpoint() (string, error)

func (*RemoteControlPlane) GetUser

func (cp *RemoteControlPlane) GetUser() IofogUser

func (*RemoteControlPlane) Sanitize

func (cp *RemoteControlPlane) Sanitize() (err error)

func (*RemoteControlPlane) UpdateController

func (cp *RemoteControlPlane) UpdateController(baseController Controller) error

func (*RemoteControlPlane) UpdateUserTokens added in v1.3.2

func (cp *RemoteControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser

type RemoteController

type RemoteController struct {
	RemoteControllerConfig `yaml:",inline"`
	Name                   string             `yaml:"name"`
	Host                   string             `yaml:"host"`
	SSH                    SSH                `yaml:"ssh,omitempty"`
	Endpoint               string             `yaml:"endpoint,omitempty"`
	Created                string             `yaml:"created,omitempty"`
	Scripts                *ControllerScripts `yaml:"scripts,omitempty"`
	SystemAgent            *SystemAgentConfig `yaml:"systemAgent,omitempty"` // Per-controller system agent config
}

func UnmarshallRemoteController

func UnmarshallRemoteController(file []byte) (controller RemoteController, err error)

func (*RemoteController) Clone

func (ctrl *RemoteController) Clone() Controller

func (*RemoteController) GetCreatedTime

func (ctrl *RemoteController) GetCreatedTime() string

func (*RemoteController) GetEndpoint

func (ctrl *RemoteController) GetEndpoint() string

func (*RemoteController) GetName

func (ctrl *RemoteController) GetName() string

func (*RemoteController) Sanitize

func (ctrl *RemoteController) Sanitize() (err error)

func (*RemoteController) SetName

func (ctrl *RemoteController) SetName(name string)

func (*RemoteController) ValidateSSH

func (ctrl *RemoteController) ValidateSSH() error

type RemoteControllerConfig added in v1.4.0

type RemoteControllerConfig struct {
	PidBaseDir    string           `yaml:"pidBaseDir,omitempty"`
	EcnViewerPort int              `yaml:"ecnViewerPort,omitempty"`
	EcnViewerURL  string           `yaml:"ecnViewerUrl,omitempty"`
	LogLevel      string           `yaml:"logLevel,omitempty"`
	Https         *Https           `yaml:"https,omitempty"`
	SiteCA        *SiteCertificate `yaml:"siteCA,omitempty"`  // router site CA
	LocalCA       *SiteCertificate `yaml:"localCA,omitempty"` // router local CA
}

type RemoteSystemMicroservices

type RemoteSystemMicroservices = install.RemoteSystemMicroservices

type Replicas

type Replicas struct {
	Controller int32 `yaml:"controller"`
}

type Route

type Route = apps.Route

type RouterIngress added in v1.2.5

type RouterIngress struct {
	Address      string `yaml:"address,omitempty"`
	MessagePort  int    `yaml:"messagePort,omitempty"`
	InteriorPort int    `yaml:"interiorPort,omitempty"`
	EdgePort     int    `yaml:"edgePort,omitempty"`
}

type SSH

type SSH struct {
	User    string `yaml:"user,omitempty"`
	Port    int    `yaml:"port,omitempty"`
	KeyFile string `yaml:"keyFile,omitempty"`
}

type Secret added in v1.4.0

type Secret struct {
	Name string            `yaml:"name,omitempty"`
	Type string            `yaml:"type,omitempty"`
	Data map[string]string `yaml:"data,omitempty"`
}

type Service

type Service struct {
	Type        string            `json:"type,omitempty"`
	Address     string            `json:"address,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

type Services

type Services struct {
	Controller Service `json:"controller,omitempty"`
	Router     Service `json:"router,omitempty"`
}

type SiteCertificate added in v1.4.0

type SiteCertificate struct {
	TLSCert string `yaml:"tlsCert,omitempty"` // base64 encoded
	TLSKey  string `yaml:"tlsKey,omitempty"`  // base64 encoded
}

type SystemAgentConfig added in v1.4.6

type SystemAgentConfig struct {
	Package            Package             `yaml:"package,omitempty"`
	Scripts            *AgentScripts       `yaml:"scripts,omitempty"` // Custom scripts
	AgentConfiguration *AgentConfiguration `yaml:"config,omitempty"`  // Configurable config
}

type Volume

type Volume struct {
	Name        string   `json:"name" yaml:"name"`
	Agents      []string `json:"agents" yaml:"agents"`
	Source      string   `json:"source" yaml:"source"`
	Destination string   `json:"destination" yaml:"destination"`
	Permissions string   `json:"permissions" yaml:"permissions"`
}

type VolumeMount added in v1.4.0

type VolumeMount struct {
	Name          string `yaml:"name,omitempty"`
	UUID          string `yaml:"uuid,omitempty"`
	ConfigMapName string `yaml:"configMapName,omitempty"`
	SecretName    string `yaml:"secretName,omitempty"`
	Version       int    `yaml:"version,omitempty"`
}

Jump to

Keyboard shortcuts

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