views

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Meta
	Status ClusterStatus `json:"status"`
}

Cluster represents cluster model for api

swagger:model views_cluster

func (*Cluster) ToJson

func (cl *Cluster) ToJson() ([]byte, error)

type ClusterList

type ClusterList []*Cluster

swagger:ignore ClusterList is a list of cluster models for api

swagger:model views_cluster_list

func (*ClusterList) ToJson

func (cl *ClusterList) ToJson() ([]byte, error)

type ClusterResources

type ClusterResources struct {
	// number of containers
	Containers int `json:"containers"`

	// number of pods
	Pods int `json:"pods"`

	// memory volume
	Memory int64 `json:"memory"`

	// number of cpu
	Cpu int `json:"cpu"`

	// storage volume
	Storage string `json:"storage"`
}

ClusterResources represents quantity of cluster resources

swagger:model views_cluster_resources

type ClusterStatus

type ClusterStatus struct {
	// cluster nodes info
	Nodes struct {
		// total number of nodes
		Total int `json:"total"`

		// number of nodes online
		Online int `json:"online"`

		// number of nodes offline
		Offline int `json:"offline"`
	} `json:"nodes"`

	Capacity ClusterResources `json:"capacity"`

	Allocated ClusterResources `json:"allocated"`
}

ClusterStatus represents status info of cluster model for api

swagger:model views_cluster_status

type ClusterView

type ClusterView struct{}

func (*ClusterView) New

func (cv *ClusterView) New(obj *types.Cluster) *Cluster

func (*ClusterView) NewList

func (cv *ClusterView) NewList(obj map[string]*types.Cluster) *ClusterList

func (*ClusterView) ToClusterStatus

func (cv *ClusterView) ToClusterStatus(status types.ClusterStatus) ClusterStatus

type Config

type Config struct {
	Meta ConfigMeta `json:"meta"`
	Spec ConfigSpec `json:"spec"`
}

swagger:model views_secret

func (*Config) Decode

func (s *Config) Decode() *types.Config

func (*Config) ToJson

func (s *Config) ToJson() ([]byte, error)

func (*Config) ToMeta

func (s *Config) ToMeta(obj types.ConfigMeta) ConfigMeta

func (*Config) ToSpec

func (s *Config) ToSpec(obj types.ConfigSpec) ConfigSpec

type ConfigList

type ConfigList []*Config

swagger:model views_secret_list

func (*ConfigList) ToJson

func (sl *ConfigList) ToJson() ([]byte, error)

type ConfigMap

type ConfigMap map[string]*Config

swagger:ignore

type ConfigMeta

type ConfigMeta struct {
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
	Kind      string    `json:"kind"`
	SelfLink  string    `json:"self_link"`
	Updated   time.Time `json:"updated"`
	Created   time.Time `json:"created"`
}

swagger:model views_secret_meta

type ConfigSpec

type ConfigSpec struct {
	Type string            `json:"type"`
	Data map[string]string `json:"data"`
}

type ConfigSpecData

type ConfigSpecData struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
	File  string `json:"file,omitempty"`
	Data  []byte `json:"data,omitempty"`
}

type ConfigView

type ConfigView struct{}

func (*ConfigView) New

func (sv *ConfigView) New(obj *types.Config) *Config

func (ConfigView) NewList

func (sv ConfigView) NewList(obj *types.ConfigList) *ConfigList

type Container

type Container struct {
	// Container ID
	ID string `json:"id"`
	// Spec ID
	Spec ContainerSpec `json:"-"`
	// Repo information
	Image string `json:"image"`
	// Container current state
	State string `json:"state"`
	// Container current state
	Status string `json:"status"`
	// Container ports mapping
	Ports map[string][]*types.Port `json:"ports"`
	// Container created time
	Created time.Time `json:"created"`
	// Container started time
	Started time.Time `json:"started"`
}

type ContainerDNSSpec

type ContainerDNSSpec struct {
	// List of DNS servers
	Server []string `json:"server"`
	// DNS server search options
	Search []string `json:"search"`
	// DNS server other options
	Options []string `json:"options"`
}

type ContainerImageSpec

type ContainerImageSpec struct {
	// Name full name
	Name string `json:"name"`
	// Name pull provision flag
	Secret string `json:"secret"`
}

type ContainerNetworkSpec

type ContainerNetworkSpec struct {
	// Container hostname
	Hostname string `json:"hostname"`
	// Container host domain
	Domain string `json:"domain"`
	// Subnet ID to use
	Network string `json:"network"`
	// Subnet Mode to use
	Mode string `json:"mode"`
}

type ContainerPortSpec

type ContainerPortSpec struct {
	// Container port to expose
	ContainerPort int `json:"container_port"`
	// Containers protocol allowed on exposed port
	Protocol string `json:"protocol"`
}

type ContainerQuotaSpec

type ContainerQuotaSpec struct {
	// Maximum memory allowed to use
	Memory int64 `json:"memory"`
	// CPU shares for container on one node
	CPUShares int64 `json:"cpu_shares"`
}

type ContainerRestartPolicySpec

type ContainerRestartPolicySpec struct {
	// Restart policy name
	Name string `json:"name"`
	// Attempt to restart container
	Attempt int `json:"attempt"`
}

type ContainerSpec

type ContainerSpec struct {
	ID   string            `json:"id"`
	Meta ContainerSpecMeta `json:"meta"`
	// Repo spec
	Image ContainerImageSpec `json:"image"`
	// Subnet spec
	Network ContainerNetworkSpec `json:"network"`
	// Ports configuration
	Ports []ContainerPortSpec `json:"ports"`
	// Labels list
	Labels map[string]string `json:"labels"`
	// Environments list
	Envs []string `json:"envs"`
	// Container enrtypoint
	Entrypoint []string `json:"entrypoint"`
	// Container run command
	Command []string `json:"command"`
	// Container run command arguments
	Args []string `json:"args"`
	// Container DNS configuration
	DNS ContainerDNSSpec `json:""`
	// Container resources quota
	Quota ContainerQuotaSpec `json:"quota"`
	// Container restart policy
	RestartPolicy ContainerRestartPolicySpec `json:"restart_policy"`
	// Container volumes mount
	Volumes []ContainerVolumeSpec `json:"volumes"`
}

type ContainerSpecMeta

type ContainerSpecMeta struct {
	// Meta id
	ID string `json:"id"`
	// Meta id
	Spec string `json:"spec"`
	// Meta name
	Name string `json:"name,omitempty"`
	// Meta description
	Description string `json:"description,omitempty"`
	// Meta labels
	Labels map[string]string `json:"lables,omitempty"`
	// Meta created time
	Created time.Time `json:"created"`
	// Meta updated time
	Updated time.Time `json:"updated"`
}

type ContainerView

type ContainerView struct{}

func (*ContainerView) FromContainerDNSSpec

func (cv *ContainerView) FromContainerDNSSpec(spec ContainerDNSSpec) types.ContainerDNSSpec

func (*ContainerView) FromContainerNetworkSpec

func (cv *ContainerView) FromContainerNetworkSpec(spec ContainerNetworkSpec) types.ContainerNetworkSpec

func (*ContainerView) FromContainerPortSpec

func (cv *ContainerView) FromContainerPortSpec(spec ContainerPortSpec) types.ContainerPortSpec

func (*ContainerView) FromContainerQuotaSpec

func (cv *ContainerView) FromContainerQuotaSpec(spec ContainerQuotaSpec) types.ContainerQuotaSpec

func (*ContainerView) FromContainerRestartPolicySpec

func (cv *ContainerView) FromContainerRestartPolicySpec(spec ContainerRestartPolicySpec) types.ContainerRestartPolicySpec

func (*ContainerView) FromContainerSpec

func (cv *ContainerView) FromContainerSpec(spec ContainerSpec) *types.ContainerSpec

func (*ContainerView) FromContainerSpecMeta

func (cv *ContainerView) FromContainerSpecMeta(meta ContainerSpecMeta) types.ContainerSpecMeta

func (*ContainerView) FromContainerVolumeSpec

func (cv *ContainerView) FromContainerVolumeSpec(spec ContainerVolumeSpec) types.ContainerVolumeSpec

func (*ContainerView) FromImageSpec

func (cv *ContainerView) FromImageSpec(spec ContainerImageSpec) types.ImageSpec

func (*ContainerView) New

func (cv *ContainerView) New(c *types.Container) Container

func (*ContainerView) NewPodContainer

func (cv *ContainerView) NewPodContainer(c *types.PodContainer) PodContainer

func (*ContainerView) ToContainerDNSSpec

func (cv *ContainerView) ToContainerDNSSpec(spec types.ContainerDNSSpec) ContainerDNSSpec

func (*ContainerView) ToContainerNetworkSpec

func (cv *ContainerView) ToContainerNetworkSpec(spec types.ContainerNetworkSpec) ContainerNetworkSpec

func (*ContainerView) ToContainerPortSpec

func (cv *ContainerView) ToContainerPortSpec(spec types.ContainerPortSpec) ContainerPortSpec

func (*ContainerView) ToContainerQuotaSpec

func (cv *ContainerView) ToContainerQuotaSpec(spec types.ContainerQuotaSpec) ContainerQuotaSpec

func (*ContainerView) ToContainerRestartPolicySpec

func (cv *ContainerView) ToContainerRestartPolicySpec(spec types.ContainerRestartPolicySpec) ContainerRestartPolicySpec

func (*ContainerView) ToContainerSpec

func (cv *ContainerView) ToContainerSpec(spec *types.ContainerSpec) ContainerSpec

func (*ContainerView) ToContainerSpecMeta

func (cv *ContainerView) ToContainerSpecMeta(meta types.ContainerSpecMeta) ContainerSpecMeta

func (*ContainerView) ToContainerVolumeSpec

func (cv *ContainerView) ToContainerVolumeSpec(spec types.ContainerVolumeSpec) ContainerVolumeSpec

func (*ContainerView) ToImageSpec

func (cv *ContainerView) ToImageSpec(spec types.ImageSpec) ContainerImageSpec

type ContainerVolumeSpec

type ContainerVolumeSpec struct {
	// Volume name
	Volume string `json:"volume"`
	// Container mount path
	MountPath string `json:"mount_path"`
}

type Deployment

type Deployment struct {
	// deployment id
	Meta     DeploymentMeta         `json:"meta"`
	Status   DeploymentStatusInfo   `json:"status"`
	Spec     DeploymentSpec         `json:"spec"`
	Sources  DeploymentSources      `json:"sources"`
	Replicas DeploymentReplicasInfo `json:"replicas"`
	// deployment pods
	Pods map[string]Pod `json:"pods"`
}

Deployment is a deployment model for api

swagger:model views_deployment

func (*Deployment) ToJson

func (di *Deployment) ToJson() ([]byte, error)

func (*Deployment) ToMeta

func (*Deployment) ToPods

func (di *Deployment) ToPods(obj *types.PodList) map[string]Pod

func (*Deployment) ToSpec

func (*Deployment) ToStatus

type DeploymentList

type DeploymentList []*Deployment

DeploymentList is a list of deployments

swagger:model views_deployment_list

func (*DeploymentList) ToJson

func (di *DeploymentList) ToJson() ([]byte, error)

type DeploymentMap

type DeploymentMap map[string]*Deployment

swagger:ignore DeploymentMap is a map of deployments

swagger:model views_deployment_map

type DeploymentMeta

type DeploymentMeta struct {
	// Deployment name
	Name string `json:"name"`
	// Deployment description
	Description string `json:"description"`

	Version   int    `json:"version"`
	Namespace string `json:"namespace"`
	Service   string `json:"service"`
	Endpoint  string `json:"endpoint"`
	SelfLink  string `json:"self_link"`
	Status    string `json:"status"`

	// Deployment creation time
	Created time.Time `json:"created"`
	// Deployment creation time
	Updated time.Time `json:"updated"`
}

DeploymentMeta is a meta of deployment model for api

swagger:model views_deployment_meta

type DeploymentReplicasInfo

type DeploymentReplicasInfo struct {
	Total     int `json:"total"`
	Provision int `json:"provision"`
	Pulling   int `json:"pulling"`
	Created   int `json:"created"`
	Started   int `json:"started"`
	Stopped   int `json:"stopped"`
	Errored   int `json:"errored"`
}

DeploymentReplicasInfo is an info about deployment replicas

swagger:model views_deployment_replicas

type DeploymentSources

type DeploymentSources struct {
	// Name namespace name
	Namespace string `json:"namespace"`
	// Name tag
	Tag string `json:"tag"`
	// Hash
	Hash string `json:"hash"`
}

DeploymentSources is a source of deployment model for api

swagger:model views_deployment_sources

type DeploymentSpec

type DeploymentSpec struct {
	Strategy types.SpecStrategy `json:"strategy"`
	Triggers types.SpecTriggers `json:"triggers"`
	Replicas int                `json:"replicas"`
	Selector types.SpecSelector `json:"selector"`
	Template types.SpecTemplate `json:"template"`
}

DeploymentSpec is a spec of deployment model for api

swagger:model views_deployment_spec

type DeploymentStatusInfo

type DeploymentStatusInfo struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

DeploymentStatusInfo is an info about deployment status

swagger:model views_deployment_status

type DeploymentView

type DeploymentView struct{}

func (*DeploymentView) New

func (dv *DeploymentView) New(obj *types.Deployment, pl *types.PodList) *Deployment

func (*DeploymentView) NewList

func (dv *DeploymentView) NewList(obj *types.DeploymentList, pods *types.PodList) *DeploymentList

type Discovery

type Discovery struct {
	Meta   DiscoveryMeta   `json:"meta"`
	Status DiscoveryStatus `json:"status"`
}

Discovery - default node structure swagger:model views_ingress

func (*Discovery) ToJson

func (obj *Discovery) ToJson() ([]byte, error)

type DiscoveryList

type DiscoveryList map[string]*Discovery

DiscoveryList - node map list swagger:model views_ingress_list

func (*DiscoveryList) ToJson

func (obj *DiscoveryList) ToJson() ([]byte, error)

type DiscoveryManifest

type DiscoveryManifest struct {
	Meta    DiscoveryManifestMeta            `json:"meta"`
	Subnets map[string]*types.SubnetManifest `json:"subnets"`
}

swagger:model views_ingress_spec

func (*DiscoveryManifest) Decode

func (obj *DiscoveryManifest) Decode() *types.DiscoveryManifest

func (*DiscoveryManifest) ToJson

func (obj *DiscoveryManifest) ToJson() ([]byte, error)

type DiscoveryManifestMeta

type DiscoveryManifestMeta struct {
	Initial bool `json:"initial"`
}

type DiscoveryMeta

type DiscoveryMeta struct {
	Meta
	Version string `json:"version"`
}

DiscoveryMeta - node metadata structure swagger:model views_ingress_meta

type DiscoveryStatus

type DiscoveryStatus struct {
	Ready bool `json:"ready"`
}

DiscoveryStatus - node state struct swagger:model views_ingress_status

type DiscoveryView

type DiscoveryView struct{}

func (*DiscoveryView) New

func (nv *DiscoveryView) New(obj *types.Discovery) *Discovery

func (*DiscoveryView) NewList

func (nv *DiscoveryView) NewList(obj *types.DiscoveryList) *DiscoveryList

func (*DiscoveryView) NewManifest

func (nv *DiscoveryView) NewManifest(obj *types.DiscoveryManifest) *DiscoveryManifest

func (*DiscoveryView) ToDiscoveryMeta

func (nv *DiscoveryView) ToDiscoveryMeta(meta types.DiscoveryMeta) DiscoveryMeta

func (*DiscoveryView) ToDiscoveryStatus

func (nv *DiscoveryView) ToDiscoveryStatus(status types.DiscoveryStatus) DiscoveryStatus

type Endpoint

type Endpoint struct {
	Meta   EndpointMeta   `json:"meta"`
	Spec   EndpointSpec   `json:"spec"`
	Status EndpointStatus `json:"status"`
}

func (*Endpoint) ToJson

func (obj *Endpoint) ToJson() ([]byte, error)

type EndpointList

type EndpointList map[string]*Endpoint

func (*EndpointList) ToJson

func (obj *EndpointList) ToJson() ([]byte, error)

type EndpointMeta

type EndpointMeta struct {
	Name     string    `json:"name"`
	SelfLink string    `json:"self_link"`
	Updated  time.Time `json:"updated"`
	Created  time.Time `json:"created"`
}

type EndpointSpec

type EndpointSpec struct {
	// Endpoint state
	State string `json:"state"`

	IP       string               `json:"ip"`
	Domain   string               `json:"domain"`
	PortMap  map[uint16]string    `json:"port_map"`
	Strategy EndpointSpecStrategy `json:"strategy"`
	Policy   string               `json:"policy"`
}

type EndpointSpecStrategy

type EndpointSpecStrategy struct {
	Route string `json:"route"`
	Bind  string `json:"bind"`
}

type EndpointStatus

type EndpointStatus struct {
}

type EndpointView

type EndpointView struct{}

func (*EndpointView) New

func (ev *EndpointView) New(obj *types.Endpoint) *Endpoint

func (*EndpointView) NewList

func (ev *EndpointView) NewList(obj map[string]*types.Endpoint) *EndpointList

func (*EndpointView) ToEndpointMeta

func (ev *EndpointView) ToEndpointMeta(meta types.EndpointMeta) EndpointMeta

func (*EndpointView) ToEndpointSpec

func (ev *EndpointView) ToEndpointSpec(meta types.EndpointSpec) EndpointSpec

func (*EndpointView) ToEndpointStatus

func (ev *EndpointView) ToEndpointStatus(meta types.EndpointStatus) EndpointStatus

type Event

type Event struct {
	Meta      types.NodeMeta   `json:"meta"`
	Status    types.NodeStatus `json:"status"`
	Pods      []types.Pod      `json:"pods"`
	Timestamp time.Time        `json:"timestamp"`
}

type IView

type IView interface {
	Cluster() *ClusterView
	Node() *NodeView
	Ingress() *IngressView
	Discovery() *DiscoveryView

	Namespace() *NamespaceView
	Route() *RouteView
	Service() *ServiceView
	Secret() *SecretView
	Config() *ConfigView
	Deployment() *DeploymentView
	Endpoint() *EndpointView
	Pod() *Pod
	Container() *ContainerView
	Volume() *VolumeView
}

type Ingress

type Ingress struct {
	Meta   IngressMeta   `json:"meta"`
	Status IngressStatus `json:"status"`
}

Ingress - default node structure swagger:model views_ingress

func (*Ingress) ToJson

func (obj *Ingress) ToJson() ([]byte, error)

type IngressList

type IngressList map[string]*Ingress

IngressList - node map list swagger:model views_ingress_list

func (*IngressList) ToJson

func (obj *IngressList) ToJson() ([]byte, error)

type IngressManifest

type IngressManifest struct {
	Meta      IngressManifestMeta                `json:"meta"`
	Routes    map[string]*types.RouteManifest    `json:"routes"`
	Endpoints map[string]*types.EndpointManifest `json:"endpoints"`
	Subnets   map[string]*types.SubnetManifest   `json:"subnets"`
	Resolvers map[string]*types.ResolverManifest `json:"resolvers"`
}

swagger:model views_ingress_spec

func (*IngressManifest) Decode

func (obj *IngressManifest) Decode() *types.IngressManifest

func (*IngressManifest) ToJson

func (obj *IngressManifest) ToJson() ([]byte, error)

type IngressManifestMeta

type IngressManifestMeta struct {
	Initial bool `json:"initial"`
}

type IngressMeta

type IngressMeta struct {
	Meta
	Version string `json:"version"`
}

IngressMeta - node metadata structure swagger:model views_ingress_meta

type IngressStatus

type IngressStatus struct {
	Ready bool `json:"ready"`
}

IngressStatus - node state struct swagger:model views_ingress_status

type IngressView

type IngressView struct{}

func (*IngressView) New

func (nv *IngressView) New(obj *types.Ingress) *Ingress

func (*IngressView) NewList

func (nv *IngressView) NewList(obj *types.IngressList) *IngressList

func (*IngressView) NewManifest

func (nv *IngressView) NewManifest(obj *types.IngressManifest) *IngressManifest

func (*IngressView) ToIngressMeta

func (nv *IngressView) ToIngressMeta(meta types.IngressMeta) IngressMeta

func (*IngressView) ToIngressStatus

func (nv *IngressView) ToIngressStatus(status types.IngressStatus) IngressStatus

type ManifestSpecNetwork

type ManifestSpecNetwork struct {
	IP    string            `json:"ip,omitempty" yaml:"ip,omitempty"`
	Ports map[uint16]string `json:"ports,omitempty" yaml:"ports,omitempty"`
}

type ManifestSpecSelector

type ManifestSpecSelector struct {
	Node   string            `json:"node,omitempty" yaml:"node,omitempty"`
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

type ManifestSpecStrategy

type ManifestSpecStrategy struct {
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
}

type ManifestSpecTemplate

type ManifestSpecTemplate struct {
	Containers []ManifestSpecTemplateContainer `json:"containers,omitempty" yaml:"containers"`
	Volumes    []ManifestSpecTemplateVolume    `json:"volumes,omitempty" yaml:"volumes"`
}

type ManifestSpecTemplateConfigVolume

type ManifestSpecTemplateConfigVolume struct {
	// Config name to mount
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Config file key
	Binds []ManifestSpecTemplateConfigVolumeBind `json:"binds,omitempty" yaml:"binds,omitempty"`
}

type ManifestSpecTemplateConfigVolumeBind

type ManifestSpecTemplateConfigVolumeBind struct {
	Key  string `json:"key" yaml:"key"`
	File string `json:"file" yaml:"file"`
}

type ManifestSpecTemplateContainer

type ManifestSpecTemplateContainer struct {
	Name          string                                 `json:"name,omitempty" yaml:"name,omitempty"`
	Command       string                                 `json:"command,omitempty" yaml:"command,omitempty"`
	Workdir       string                                 `json:"workdir,omitempty" yaml:"workdir,omitempty"`
	Entrypoint    string                                 `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
	Args          []string                               `json:"args,omitempty" yaml:"args,omitempty"`
	Ports         []string                               `json:"ports,omitempty" yaml:"ports,omitempty"`
	Env           []ManifestSpecTemplateContainerEnv     `json:"env,omitempty" yaml:"env,omitempty"`
	Image         ManifestSpecTemplateContainerImage     `json:"image,omitempty" yaml:"image,omitempty"`
	Resources     ManifestSpecTemplateContainerResources `json:"resources,omitempty" yaml:"resources,omitempty"`
	Volumes       []ManifestSpecTemplateContainerVolume  `json:"volumes,omitempty" yaml:"volumes,omitempty"`
	RestartPolicy ManifestSpecTemplateRestartPolicy      `json:"restart_policy,omitempty" yaml:"restart_policy,omitempty"`
}

type ManifestSpecTemplateContainerEnv

type ManifestSpecTemplateContainerEnv struct {
	Name   string                                 `json:"name,omitempty" yaml:"name,omitempty"`
	Value  string                                 `json:"value,omitempty" yaml:"value,omitempty"`
	Secret ManifestSpecTemplateContainerEnvSecret `json:"secret,omitempty" yaml:"secret,omitempty"`
	Config ManifestSpecTemplateContainerEnvConfig `json:"config,omitempty" yaml:"config,omitempty"`
}

type ManifestSpecTemplateContainerEnvConfig

type ManifestSpecTemplateContainerEnvConfig struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	Key  string `json:"key,omitempty" yaml:"key,omitempty"`
}

type ManifestSpecTemplateContainerEnvSecret

type ManifestSpecTemplateContainerEnvSecret struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	Key  string `json:"key,omitempty" yaml:"key,omitempty"`
}

type ManifestSpecTemplateContainerImage

type ManifestSpecTemplateContainerImage struct {
	Name   string `json:"name,omitempty" yaml:"name,omitempty"`
	Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
}

type ManifestSpecTemplateContainerResource

type ManifestSpecTemplateContainerResource struct {
	// CPU resource option
	CPU int64 `json:"cpu,omitempty" yaml:"cpu,omitempty"`
	// RAM resource option
	RAM int64 `json:"ram,omitempty" yaml:"ram,omitempty"`
}

type ManifestSpecTemplateContainerResources

type ManifestSpecTemplateContainerResources struct {
	// Limit resources
	Limits ManifestSpecTemplateContainerResource `json:"limits,omitempty" yaml:"limits,omitempty"`
	// Request resources
	Request ManifestSpecTemplateContainerResource `json:"quota,omitempty" yaml:"quota,omitempty"`
}

type ManifestSpecTemplateContainerVolume

type ManifestSpecTemplateContainerVolume struct {
	// Volume name
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Volume mount mode
	Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
	// Volume mount path
	Path string `json:"path,omitempty" yaml:"path,omitempty"`
}

type ManifestSpecTemplateRestartPolicy

type ManifestSpecTemplateRestartPolicy struct {
	Policy  string `json:"policy,omitempty" yaml:"policy,omitempty"`
	Attempt int    `json:"attempt,omitempty" yaml:"attempt,omitempty"`
}

type ManifestSpecTemplateSecretVolume

type ManifestSpecTemplateSecretVolume struct {
	// Secret name to mount
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Secret file key
	Binds []ManifestSpecTemplateSecretVolumeBind `json:"binds,omitempty" yaml:"binds,omitempty"`
}

type ManifestSpecTemplateSecretVolumeBind

type ManifestSpecTemplateSecretVolumeBind struct {
	Key  string `json:"key" yaml:"key"`
	File string `json:"file" yaml:"file"`
}

type ManifestSpecTemplateVolume

type ManifestSpecTemplateVolume struct {
	// Template volume name
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Template volume type
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
	// Template volume from secret type
	Volume ManifestSpecTemplateVolumeClaim `json:"volume,omitempty" yaml:"volume,omitempty"`
	// Template volume from secret type
	Config ManifestSpecTemplateConfigVolume `json:"config,omitempty" yaml:"config,omitempty"`
	// Template volume from secret type
	Secret ManifestSpecTemplateSecretVolume `json:"secret,omitempty" yaml:"secret,omitempty"`
}

type ManifestSpecTemplateVolumeClaim

type ManifestSpecTemplateVolumeClaim struct {
	// Persistent volume name to mount
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Persistent volume subpath
	Subpath string `json:"subpath,omitempty" yaml:"subpath,omitempty"`
}

type Meta

type Meta struct {
	// Meta name
	Name string `json:"name,omitempty",yaml:"name,omitempty"`
	// Meta description
	Description string `json:"description",yaml:"description"`
	// Meta self link
	SelfLink string `json:"self_link",yaml:"self_link"`
	// Meta labels
	Labels map[string]string `json:"labels",yaml:"labels"`
	// Meta created time
	Created time.Time `json:"created",yaml:"created"`
	// Meta updated time
	Updated time.Time `json:"updated",yaml:"updated"`
}

type Namespace

type Namespace struct {
	Meta   NamespaceMeta   `json:"meta"`
	Status NamespaceStatus `json:"status"`
	Spec   NamespaceSpec   `json:"spec"`
}

swagger:model views_namespace

func (*Namespace) ToEnv

func (*Namespace) ToJson

func (p *Namespace) ToJson() ([]byte, error)

func (*Namespace) ToMeta

func (r *Namespace) ToMeta(obj types.NamespaceMeta) NamespaceMeta

func (*Namespace) ToResources

func (*Namespace) ToSpec

func (r *Namespace) ToSpec(spec types.NamespaceSpec) NamespaceSpec

func (*Namespace) ToStatus

func (r *Namespace) ToStatus(status types.NamespaceStatus) NamespaceStatus

type NamespaceDomain

type NamespaceDomain struct {
	Internal string `json:"internal"`
	External string `json:"external"`
}

type NamespaceEnvs

type NamespaceEnvs []string

swagger:model views_namespace_envs

type NamespaceList

type NamespaceList []*Namespace

swagger:model views_namespace_list

func (*NamespaceList) ToJson

func (n *NamespaceList) ToJson() ([]byte, error)

type NamespaceMeta

type NamespaceMeta struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	SelfLink    string            `json:"self_link"`
	Endpoint    string            `json:"endpoint"`
	Suffix      string            `json:"suffix"`
	Labels      map[string]string `json:"labels"`
	Created     time.Time         `json:"created"`
	Updated     time.Time         `json:"updated"`
}

swagger:model views_namespace_meta

type NamespaceResource

type NamespaceResource struct {
	RAM     string `json:"ram"`
	CPU     string `json:"cpu"`
	Storage string `json:"storage"`
}

swagger:model views_namespace_resource

type NamespaceResources

type NamespaceResources struct {
	Request NamespaceResource `json:"request"`
	Limits  NamespaceResource `json:"limits"`
}

type NamespaceSpec

type NamespaceSpec struct {
	Env       NamespaceEnvs      `json:"env"`
	Domain    NamespaceDomain    `json:"domain"`
	Resources NamespaceResources `json:"resources"`
}

swagger:model views_namespace_spec

type NamespaceStatus

type NamespaceStatus struct {
	Resources NamespaceStatusResources `json:"resources"`
}

type NamespaceStatusResources

type NamespaceStatusResources struct {
	Usage NamespaceResource `json:"usage"`
}

type NamespaceView

type NamespaceView struct{}

func (*NamespaceView) New

func (nv *NamespaceView) New(obj *types.Namespace) *Namespace

func (NamespaceView) NewList

func (nv NamespaceView) NewList(obj *types.NamespaceList) *NamespaceList

type Node

type Node struct {
	Meta   NodeMeta   `json:"meta"`
	Status NodeStatus `json:"status"`
	Spec   NodeSpec   `json:"spec"`
}

Node - default node structure swagger:model views_node

func (*Node) ToJson

func (obj *Node) ToJson() ([]byte, error)

type NodeInfo

type NodeInfo struct {
	Hostname     string `json:"hostname"`
	OSName       string `json:"os_name"`
	OSType       string `json:"os_type"`
	Architecture string `json:"architecture"`
	IP           struct {
		External string `json:"external"`
		Internal string `json:"internal"`
	} `json:"ip"`
	CIDR    string `json:"cidr"`
	Version string `json:"version"`
}

NodeInfo - node info struct swagger:model views_node_info

type NodeList

type NodeList map[string]*Node

NodeList - node map list swagger:model views_node_list

func (*NodeList) ToJson

func (obj *NodeList) ToJson() ([]byte, error)

type NodeManifest

type NodeManifest struct {
	Meta      NodeManifestMeta                   `json:"meta"`
	Discovery map[string]*types.ResolverManifest `json:"discovery"`
	Configs   map[string]*types.ConfigManifest   `json:"configs,omitempty"`
	Secrets   map[string]*types.SecretManifest   `json:"secrets,omitempty"`
	Network   map[string]*types.SubnetManifest   `json:"network,omitempty"`
	Pods      map[string]*types.PodManifest      `json:"pods,omitempty"`
	Volumes   map[string]*types.VolumeManifest   `json:"volumes,omitempty"`
	Endpoints map[string]*types.EndpointManifest `json:"endpoints,omitempty"`
}

swagger:model views_node_spec

func (*NodeManifest) Decode

func (obj *NodeManifest) Decode() *types.NodeManifest

func (*NodeManifest) ToJson

func (obj *NodeManifest) ToJson() ([]byte, error)

type NodeManifestMeta

type NodeManifestMeta struct {
	Initial bool `json:"initial"`
}

type NodeMeta

type NodeMeta struct {
	NodeInfo
	Name     string            `json:"name"`
	Labels   map[string]string `json:"labels"`
	SelfLink string            `json:"self_link"`
	Created  time.Time         `json:"created"`
	Updated  time.Time         `json:"updated"`
}

NodeMeta - node metadata structure swagger:model views_node_meta

type NodeResources

type NodeResources struct {
	Containers int   `json:"containers"`
	Pods       int   `json:"pods"`
	Memory     int64 `json:"memory"`
	Cpu        int   `json:"cpu"`
	Storage    int64 `json:"storage"`
}

NodeResources - node resources structure swagger:model views_node_resources

type NodeSecurity

type NodeSecurity struct {
	TLS bool `json:"tls"`
}

type NodeSpec

type NodeSpec struct {
	Security NodeSecurity `json:"security"`
}

swagger:ignore swagger:model types_node_spec

type NodeStatus

type NodeStatus struct {
	State     NodeStatusState `json:"state"`
	Online    bool            `json:"online"`
	Capacity  NodeResources   `json:"capacity"`
	Allocated NodeResources   `json:"allocated"`
}

NodeStatus - node state struct swagger:model views_node_status

type NodeStatusInterfaceState

type NodeStatusInterfaceState struct {
	Type    string `json:"type"`
	Version string `json:"version"`
	State   string `json:"state"`
	Message string `json:"message"`
}

type NodeStatusState

type NodeStatusState struct {
	Ready bool                     `json:"ready"`
	CRI   NodeStatusInterfaceState `json:"cri"`
	CNI   NodeStatusInterfaceState `json:"cni"`
	CPI   NodeStatusInterfaceState `json:"cpi"`
	CSI   NodeStatusInterfaceState `json:"csi"`
}

type NodeView

type NodeView struct{}

func (*NodeView) New

func (nv *NodeView) New(obj *types.Node) *Node

func (*NodeView) NewList

func (nv *NodeView) NewList(obj *types.NodeList) *NodeList

func (*NodeView) NewManifest

func (nv *NodeView) NewManifest(obj *types.NodeManifest) *NodeManifest

func (*NodeView) ToNodeMeta

func (nv *NodeView) ToNodeMeta(meta types.NodeMeta) NodeMeta

func (*NodeView) ToNodeSpec

func (nv *NodeView) ToNodeSpec(spec types.NodeSpec) NodeSpec

func (*NodeView) ToNodeStatus

func (nv *NodeView) ToNodeStatus(status types.NodeStatus) NodeStatus

type Pod

type Pod struct {
	// Pod meta id
	ID string `json:"id"`
	// Pod Meta
	Meta PodMeta `json:"meta"`
	// Pod Spec
	Spec PodSpec `json:"spec"`
	// Pod containers
	Status PodStatus `json:"status"`
}

swagger:model views_pod

type PodContainer

type PodContainer struct {
	// Pod container ID
	ID string `json:"id"`
	// Pod ID
	Pod string `json:"pod"`
	// Pod container name
	Name string `json:"name"`
	// Pod container state
	State PodContainerState `json:"state"`
	// Pod container ready
	Ready bool `json:"ready"`
	// Pod container restart count
	Restart int `json:"restared"`
	// Pod container image meta
	Image PodContainerImage `json:"image"`
}

PodContainer is a container of the pod swagger:model views_pod_container

type PodContainerImage

type PodContainerImage struct {
	// Pod container image ID
	ID string `json:"id"`
	// Pod container image name
	Name string `json:"name"`
}

PodContainerImage is an image of pod container swagger:model views_pod_container_state

type PodContainerState

type PodContainerState struct {
	// Container create state
	Created PodContainerStateCreated `json:"created"`

	// Container started state
	Started PodContainerStateStarted `json:"started"`

	// Container stopped state
	Stopped PodContainerStateStopped `json:"stopped"`

	// Container error state
	Error PodContainerStateError `json:"error"`
}

PodContainerState is a state of pod container swagger:model views_pod_container_state

type PodContainerStateCreated

type PodContainerStateCreated struct {
	Created time.Time `json:"created"`
}

swagger:ignore PodContainerStateCreated represents creation time of the pod container swagger:model views_pod_container_state_created

type PodContainerStateError

type PodContainerStateError struct {
	// was error happened
	Error   bool                  `json:"error"`
	Message string                `json:"message"`
	Exit    PodContainerStateExit `json:"exit"`
}

swagger:ignore PodContainerStateError shows if pod container got error swagger:model views_pod_container_state_error

type PodContainerStateExit

type PodContainerStateExit struct {
	Code      int       `json:"code"`
	Timestamp time.Time `json:"timestamp"`
}

swagger:ignore PodContainerStateExit represents an exit status of pod container after stop or error swagger:model views_pod_container_state_exit

type PodContainerStateStarted

type PodContainerStateStarted struct {
	// was the container started
	Started   bool      `json:"started"`
	Timestamp time.Time `json:"timestamp"`
}

swagger:ignore PodContainerStateStarted represents time when pod container was started swagger:model views_pod_container_state_started

type PodContainerStateStopped

type PodContainerStateStopped struct {
	// was the container stopped
	Stopped bool                  `json:"stopped"`
	Exit    PodContainerStateExit `json:"exit"`
}

swagger:ignore PodContainerStateStopped shows if pod container was stopped swagger:model views_pod_container_state_stopped

type PodContainers

type PodContainers []PodContainer

PodContainers is a list of pod containers swagger:model views_pod_container_list

type PodList

type PodList map[string]*Pod

swagger:ignore PodList is a map of pods swagger:model views_pod_list

type PodMeta

type PodMeta struct {
	// Meta name
	Name string `json:"name"`
	// Meta description
	Description string `json:"description"`
	// Pod SelfLink
	SelfLink string `json:"self_link"`
	// Pod deployment id
	Deployment string `json:"deployment"`
	// Pod service id
	Namespace string `json:"namespace"`
	// Pod node id
	Node string `json:"node"`
	// Pod status
	Status string `json:"status"`
	// Meta labels
	Labels map[string]string `json:"labels"`
	// Meta created time
	Created time.Time `json:"created"`
	// Meta updated time
	Updated time.Time `json:"updated"`
}

PodMeta is a meta of pod swagger:model views_pod_meta

type PodNetwork

type PodNetwork struct {
	// Pod host IP
	HostIP string `json:"host_ip"`
	// Pod IP
	PodIP string `json:"pod_ip"`
}

swagger:model views_pod_network

type PodSpec

type PodSpec struct {
	State    PodSpecState    `json:"state"`
	Template PodSpecTemplate `json:"template"`
}

PodSpec is a spec of pod swagger:model views_pod_spec

type PodSpecState

type PodSpecState struct {
	Destroy     bool `json:"destroy"`
	Maintenance bool `json:"maintenance"`
}

PodSpecState is a state of pod spec swagger:model views_pod_spec_state

type PodSpecTemplate

type PodSpecTemplate struct {
	// Template Volume
	Volumes types.SpecTemplateVolumeList `json:"volumes"`
	// Template main container
	Containers types.SpecTemplateContainers `json:"containers"`
	// Termination period
	Termination int `json:"termination"`
}

PodSpecTemplate is a template of pod spec swagger:model views_pod_spec_template

type PodStatus

type PodStatus struct {
	// Pod state
	State string `json:"state"`
	// Pod state message
	Message string `json:"message"`
	// Pod steps
	Steps PodSteps `json:"steps"`
	// Pod network
	Network PodNetwork `json:"network"`
	// Pod containers
	Containers PodContainers `json:"containers"`
}

PodStatus is a status of pod swagger:model views_pod_status

type PodStep

type PodStep struct {
	// Pod step ready
	Ready bool `json:"ready"`
	// Pod step timestamp
	Timestamp time.Time `json:"timestamp"`
}

swagger:model views_pod_step

type PodSteps

type PodSteps map[string]PodStep

PodSteps is a map of pod steps swagger:model views_pod_step_map

type PodViewHelper

type PodViewHelper struct{}

func (*PodViewHelper) New

func (pv *PodViewHelper) New(pod *types.Pod) Pod

type RequestDeploymentScaleOptions

type RequestDeploymentScaleOptions struct {
	// Number of replicas
	Replicas *int `json:"replicas"`
}

swagger:ignore RequestDeploymentScaleOptions is a ...

swagger:model views_deployment_scale

func (*RequestDeploymentScaleOptions) DecodeAndValidate

func (s *RequestDeploymentScaleOptions) DecodeAndValidate(reader io.Reader) (types.DeploymentOptions, error)

type Route

type Route struct {
	Meta   RouteMeta   `json:"meta"`
	Spec   RouteSpec   `json:"spec"`
	Status RouteStatus `json:"status"`
}

swagger:model views_route

func (*Route) ToJson

func (p *Route) ToJson() ([]byte, error)

func (*Route) ToMeta

func (r *Route) ToMeta(obj types.RouteMeta) RouteMeta

func (*Route) ToSpec

func (r *Route) ToSpec(obj types.RouteSpec) RouteSpec

func (*Route) ToStatus

func (r *Route) ToStatus(obj types.RouteStatus) RouteStatus

type RouteList

type RouteList []*Route

swagger:model views_route_list

func (*RouteList) ToJson

func (n *RouteList) ToJson() ([]byte, error)

type RouteMap

type RouteMap map[string]*Route

swagger:ignore

type RouteMeta

type RouteMeta struct {
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
	SelfLink  string    `json:"self_link"`
	Updated   time.Time `json:"updated"`
	Created   time.Time `json:"created"`
}

swagger:model views_route_meta

type RouteRule

type RouteRule struct {
	Service  string `json:"service"`
	Path     string `json:"path"`
	Endpoint string `json:"endpoint"`
	Port     int    `json:"port"`
}

swagger:model views_route_rule

type RouteSpec

type RouteSpec struct {
	Domain string       `json:"domain"`
	Port   uint16       `json:"port"`
	Rules  []*RouteRule `json:"rules"`
}

swagger:model views_route_spec

type RouteStatus

type RouteStatus struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

swagger:model views_route_status

type RouteView

type RouteView struct{}

func (*RouteView) New

func (rv *RouteView) New(obj *types.Route) *Route

func (RouteView) NewList

func (rv RouteView) NewList(obj *types.RouteList) *RouteList

type Secret

type Secret struct {
	Meta SecretMeta `json:"meta"`
	Spec SecretSpec `json:"spec"`
}

swagger:model views_secret

func (*Secret) Decode

func (s *Secret) Decode() *types.Secret

func (*Secret) ToJson

func (s *Secret) ToJson() ([]byte, error)

func (*Secret) ToMeta

func (s *Secret) ToMeta(obj types.SecretMeta) SecretMeta

func (*Secret) ToSpec

func (s *Secret) ToSpec(obj types.SecretSpec) SecretSpec

type SecretList

type SecretList []*Secret

swagger:model views_secret_list

func (*SecretList) ToJson

func (sl *SecretList) ToJson() ([]byte, error)

type SecretMap

type SecretMap map[string]*Secret

swagger:ignore

type SecretMeta

type SecretMeta struct {
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
	SelfLink  string    `json:"self_link"`
	Updated   time.Time `json:"updated"`
	Created   time.Time `json:"created"`
}

swagger:model views_secret_meta

type SecretSpec

type SecretSpec struct {
	Type string            `json:"type"`
	Data map[string]string `json:"data"`
}

type SecretView

type SecretView struct{}

func (*SecretView) New

func (sv *SecretView) New(obj *types.Secret) *Secret

func (SecretView) NewList

func (sv SecretView) NewList(obj *types.SecretList) *SecretList

type Service

type Service struct {
	Meta        ServiceMeta            `json:"meta"`
	Stats       ServiceStats           `json:"stats"`
	Status      ServiceStatus          `json:"status"`
	Spec        ServiceSpec            `json:"spec"`
	Deployments map[string]*Deployment `json:"deployments,omitempty"`
}

swagger:model views_service

func (*Service) ToDeployments

func (sv *Service) ToDeployments(obj *types.DeploymentList, pods *types.PodList) DeploymentMap

func (*Service) ToJson

func (sv *Service) ToJson() ([]byte, error)

func (*Service) ToMeta

func (sv *Service) ToMeta(obj types.ServiceMeta) ServiceMeta

func (Service) ToRequestManifest

func (sv Service) ToRequestManifest() *request.ServiceManifest

func (*Service) ToSpec

func (sv *Service) ToSpec(obj types.ServiceSpec) ServiceSpec

func (*Service) ToStatus

func (sv *Service) ToStatus(obj types.ServiceStatus) ServiceStatus

type ServiceDeployment

type ServiceDeployment struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Pods    map[string]Pod
	Started time.Time `json:"started"`
}

swagger:ignore

type ServiceEndpoint

type ServiceEndpoint struct {
	Name      string `json:"name"`
	Technical bool   `json:"technical"`
	Main      bool   `json:"main"`
}

swagger:ignore

type ServiceImage

type ServiceImage struct {
	// Name namespace name
	Namespace string `json:"namespace"`
	// Name tag
	Tag string `json:"tag"`
	// Hash
	Hash string `json:"hash"`
}

swagger:ignore

type ServiceList

type ServiceList []*Service

swagger:model views_service_list

func (*ServiceList) ToJson

func (sv *ServiceList) ToJson() ([]byte, error)

type ServiceMeta

type ServiceMeta struct {
	Name        string            `json:"name"`
	Namespace   string            `json:"namespace"`
	Description string            `json:"description"`
	SelfLink    string            `json:"self_link"`
	Endpoint    string            `json:"endpoint"`
	Replicas    int               `json:"replicas"`
	Labels      map[string]string `json:"labels"`
	Created     time.Time         `json:"created"`
	Updated     time.Time         `json:"updated"`
}

swagger:model views_service_meta

type ServiceSourcesRepo

type ServiceSourcesRepo struct {
}

swagger:ignore

type ServiceSpec

type ServiceSpec struct {
	Selector ManifestSpecSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
	Replicas int                  `json:"replicas,omitempty" yaml:"replicas,omitempty"`
	Network  ManifestSpecNetwork  `json:"network,omitempty" yaml:"network,omitempty"`
	Strategy ManifestSpecStrategy `json:"strategy,omitempty" yaml:"strategy,omitempty"`
	Template ManifestSpecTemplate `json:"template,omitempty" yaml:"template,omitempty"`
}

swagger:model views_service_spec

type ServiceSpecMeta

type ServiceSpecMeta struct {
	ID        string `json:"id,omitempty"`
	ServiceID string `json:"service_id,omitempty"`
	Parent    string `json:"parent,omitempty"`
	Active    bool   `json:"active,omitempty"`
	Revision  int    `json:"revision,omitempty"`
}

swagger:model views_service_spec_meta

type ServiceSpecPort

type ServiceSpecPort struct {
	Protocol  string `json:"protocol"`
	Container uint16 `json:"internal"`
	Host      uint16 `json:"external"`
	Published bool   `json:"published"`
}

swagger:model views_service_spec_port

type ServiceStats

type ServiceStats struct {
	Memory  int64 `json:"memory"`
	Cpu     int64 `json:"cpu"`
	Network int64 `json:"network"`
}

swagger:model views_service_stats

type ServiceStatus

type ServiceStatus struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

swagger:model views_service_status

type ServiceTemplateSpec

type ServiceTemplateSpec struct {
}

type ServiceView

type ServiceView struct{}

func (*ServiceView) New

func (sv *ServiceView) New(srv *types.Service) *Service

func (*ServiceView) NewList

func (*ServiceView) NewWithDeployment

func (sv *ServiceView) NewWithDeployment(srv *types.Service, d *types.DeploymentList, p *types.PodList) *Service

type View

type View struct{}

func (View) Cluster

func (View) Cluster() *ClusterView

func (View) Config

func (View) Config() *ConfigView

func (View) Container

func (View) Container() *ContainerView

func (View) Deployment

func (View) Deployment() *DeploymentView

func (View) Discovery

func (View) Discovery() *DiscoveryView

func (View) Endpoint

func (View) Endpoint() *EndpointView

func (View) Ingress

func (View) Ingress() *IngressView

func (View) Namespace

func (View) Namespace() *NamespaceView

func (View) Node

func (View) Node() *NodeView

func (View) Pod

func (View) Pod() *Pod

func (View) Route

func (View) Route() *RouteView

func (View) Secret

func (View) Secret() *SecretView

func (View) Service

func (View) Service() *ServiceView

func (View) Volume

func (View) Volume() *VolumeView

type Volume

type Volume struct {
	Meta   VolumeMeta   `json:"meta"`
	Spec   VolumeSpec   `json:"spec"`
	Status VolumeStatus `json:"status"`
}

func (*Volume) ToJson

func (p *Volume) ToJson() ([]byte, error)

func (*Volume) ToMeta

func (r *Volume) ToMeta(obj types.VolumeMeta) VolumeMeta

func (*Volume) ToSpec

func (r *Volume) ToSpec(obj types.VolumeSpec) VolumeSpec

func (*Volume) ToStatus

func (r *Volume) ToStatus(obj types.VolumeStatus) VolumeStatus

type VolumeList

type VolumeList []*Volume

func (*VolumeList) ToJson

func (n *VolumeList) ToJson() ([]byte, error)

type VolumeMeta

type VolumeMeta struct {
	Name        string    `json:"name"`
	Namespace   string    `json:"namespace"`
	Description string    `json:"description"`
	SelfLink    string    `json:"self_link"`
	Updated     time.Time `json:"updated"`
	Created     time.Time `json:"created"`
}

type VolumeSpec

type VolumeSpec struct {
	Selector   VolumeSpecSelector `json:"selector"`
	State      VolumeSpecState    `json:"state"`
	Type       string             `json:"type"`
	HostPath   string             `json:"path"`
	AccessMode string             `json:"mode"`
	Capacity   VolumeSpecCapacity `json:"capacity"`
}

type VolumeSpecCapacity

type VolumeSpecCapacity struct {
	Storage string `json:"storage"`
}

type VolumeSpecSelector

type VolumeSpecSelector struct {
	Node   string            `json:"node"`
	Labels map[string]string `json:"labels"`
}

type VolumeSpecState

type VolumeSpecState struct {
	Destroy bool `json:"destroy"`
}

type VolumeStatus

type VolumeStatus struct {
}

type VolumeView

type VolumeView struct{}

func (*VolumeView) New

func (rv *VolumeView) New(obj *types.Volume) *Volume

func (VolumeView) NewList

func (rv VolumeView) NewList(obj *types.VolumeList) *VolumeList

Jump to

Keyboard shortcuts

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