models

package
Version: v0.0.0-...-3529631 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTemplateAsJson

func GetTemplateAsJson(s string) (string, error)

func PrintSolutionTemplates

func PrintSolutionTemplates(t *[]SolutionTemplate)

Types

type BuildLog

type BuildLog struct {
	ID            int    `json:"pk"`
	Cluster       int    `json:"cluster"`
	EventCategory string `json:"event_category"`
	EventType     string `json:"event_type"`
	EventState    string `json:"event_state"`
	Message       string `json:"message"`
	Reference     string `json:"reference"`
	Created       string `json:"created"`
}

type Chart

type Chart struct {
	Name        string              `json:"name"`
	Created     string              `json:"created"`
	Description string              `json:"description"`
	AppVersion  interface{}         `json:"appVersion"`
	Sources     []string            `json:"sources"`
	Maintainers []map[string]string `json:"maintainers"`
	Version     string              `json:"version"`
	URLs        []string            `json:"urls"`
	Keywords    []string            `json:"keywords"`
	Home        string              `json:"home"`
	Digest      string              `json:"digest"`
	Icon        string              `json:"icon"`
}

type ChartIndex

type ChartIndex struct {
	Name    string                 `json:"name"`
	Sha     string                 `json:"sha"`
	Chart   Chart                  `json:"Chart"`
	Values  string                 `json:"values"`
	Path    string                 `json:"path"`
	Spec    map[string]interface{} `json:"spec"`
	Version string                 `json:"version,omitempty"`
}

type CheckRepositoryContents

type CheckRepositoryContents struct {
	Name        string            `json:"name"`
	URL         string            `json:"url"`
	HtmlUrl     string            `json:"html_url"`
	DownloadURL string            `json:"download_url"`
	Sha         string            `json:"sha"`
	Links       map[string]string `json:"_links"`
	GitURL      string            `json:"git_url"`
	Path        string            `json:"path"`
	Type        string            `json:"type"`
	Size        int               `json:"size"`
}

type CheckRepositoryInput

type CheckRepositoryInput struct {
	Name      string             `json:"name"`
	Source    string             `json:"source"`
	Path      string             `json:"path"`
	URL       string             `json:"url"`
	KeysetId  *int               `json:"keyset"`
	IsPrivate bool               `json:"is_private"`
	Config    map[string]*string `json:"config"`
}

type CheckRepositoryResponse

type CheckRepositoryResponse struct {
	Accessible   bool                      `json:"accessible"`
	Directories  []string                  `json:"directories"`
	IsMultiChart bool                      `json:"is_multi_chart"`
	Error        *string                   `json:"error"`
	Contents     []CheckRepositoryContents `json:"contents"`
}

type CreateClusterInput

type CreateClusterInput struct {
	Name        string `json:"name"`
	Provider    string `json:"provider"`
	WorkspaceID int    `json:"workspace,omitempty"`
	ProviderKey int    `json:"provider_keyset,omitempty"`

	MasterCount           int    `json:"master_count,omitempty"`
	MasterSize            string `json:"master_size,omitempty"`
	MasterRootDiskSize    int    `json:"master_root_disk_size,omitempty"`
	MasterGPUInstanceSize string `json:"master_gpu_instance_size,omitempty"`
	MasterGPUCoreCount    *int   `json:"master_gpu_core_count,omitempty"`

	WorkerCount           int    `json:"worker_count,omitempty"`
	WorkerSize            string `json:"worker_size,omitempty"`
	WorkerGPUInstanceSize string `json:"worker_gpu_instance_size,omitempty"`
	WorkerGPUCoreCount    *int   `json:"worker_gpu_core_count,omitempty"`
	WorkerRootDiskSize    int    `json:"worker_root_disk_size,omitempty"`

	KubernetesVersion string `json:"k8s_version,omitempty"`
	DashboardEnabled  bool   `json:"k8s_dashboard_enabled,omitempty"`
	RbacEnabled       bool   `json:"k8s_rbac_enabled,omitempty"`
	K8sPodCIDR        string `json:"k8s_pod_cidr,omitempty"`
	K8sServiceCIDR    string `json:"k8s_service_cidr,omitempty"`

	ProjectID string `json:"project_id,omitempty"`

	SSHKeySet int `json:"user_ssh_keyset,omitempty"`

	EtcdType  string         `json:"etcd_type,omitempty"`
	Platform  string         `json:"platform,omitempty"`
	Channel   string         `json:"channel,omitempty"`
	Region    string         `json:"region,omitempty"`
	Solutions []nks.Solution `json:"solutions,omitempty"`

	Config *map[string]bool `json:"config,omitempty"`

	MinNodeCount        *int     `json:"min_node_count,omitempty"`
	MaxNodeCount        *int     `json:"max_node_count,omitempty"`
	Owner               int      `json:"owner,omitempty"`
	ProviderSubnetID    string   `json:"provider_subnet_id,omitempty"`
	ProviderSubnetCidr  string   `json:"provider_subnet_cidr,omitempty"`
	ProviderNetworkID   string   `json:"provider_network_id,omitempty"`
	ProviderNetworkCIDR string   `json:"provider_network_cidr,omitempty"`
	Features            []string `json:"features,omitempty"`
}

type CreateClusterInputGCE

type CreateClusterInputGCE struct {
	Name     string `json:"name"`
	Provider string `json:"provider"`
	//WorkspaceID      int    `json:"workspace"`
	ProviderKey int `json:"provider_keyset"`

	MasterCount int    `json:"master_count"`
	MasterSize  string `json:"master_size"`

	WorkerCount int    `json:"worker_count"`
	WorkerSize  string `json:"worker_size"`

	KubernetesVersion string `json:"k8s_version"`
	DashboardEnabled  bool   `json:"k8s_dashboard_enabled"`
	RbacEnabled       bool   `json:"k8s_rbac_enabled"`

	SSHKeySet int `json:"user_ssh_keyset"`

	EtcdType  string         `json:"etcd_type"`
	Platform  string         `json:"platform"`
	Channel   string         `json:"channel"`
	Region    string         `json:"region"`
	Solutions []nks.Solution `json:"solutions"`
}

type CreateRepoInput

type CreateRepoInput []CheckRepositoryInput

type ExtraData

type ExtraData struct {
	Org     ExtraDataOrg `json:"org"`
	Cluster struct {
		ID   int    `json:"pk"`
		Name string `json:"name"`
	} `json:"cluster"`
}

type ExtraDataCluster

type ExtraDataCluster struct {
	ID   int    `json:"pk"`
	Name string `json:"name"`
}

type ExtraDataOrg

type ExtraDataOrg struct {
	ID   int    `json:"pk"`
	Name string `json:"name"`
}

type Notification

type Notification struct {
	ID           int         `json:"pk"`
	Message      string      `json:"message"`
	Details      string      `json:"details"`
	Category     string      `json:"category"`
	Topic        string      `json:"topic"`
	Level        string      `json:"level"`
	Announcement interface{} `json:"announcement"`
	BuildLog     BuildLog    `json:"build_log"`
	ExtraData    ExtraData   `json:"extra_data"`
	Read         bool        `json:"read"`
	Seen         bool        `json:"seen"`
	Issued       string      `json:"issued"`
}

type Notifications

type Notifications []Notification

type Repository

type Repository struct {
	ID             int          `json:"pk"`
	Name           string       `json:"name,omitempty"`
	Source         string       `json:"source"`
	SourceDisplay  string       `json:"Github"`
	OrganizationId int          `json:"org"`
	Path           string       `json:"path"`
	URL            string       `json:"url"`
	IsSystem       bool         `json:"is_system"`
	IsPrivate      bool         `json:"is_private"`
	KeysetId       *int         `json:"keyset"`
	ChartIndex     []ChartIndex `json:"chart_index"`
	State          string       `json:"state"`
	Owner          int          `json:"owner"`
	IsAccessible   bool         `json:"is_accessible"`
	Synced         *string      `json:"synced"`
	Created        string       `json:"created"`
	Updated        string       `json:"updated"`
}

type RepositoryS

type RepositoryS []Repository

type SolutionTemplate

type SolutionTemplate struct {
	Name         string                       `json:"name"`
	Solution     string                       `json:"solution"`
	Installer    string                       `json:"installer"`
	Keyset       *int                         `json:"keyset"`
	Mode         *string                      `json:"mode"`
	Tag          string                       `json:"tag"`
	Version      string                       `json:"version"`
	Config       SolutionTemplateConfig       `json:"config"`
	Spec         SolutionTemplateSpec         `json:"spec"`
	Dependencies SolutionTemplateDependencies `json:"dependencies"`
}

func ListSolutionTemplates

func ListSolutionTemplates() []SolutionTemplate

func RepositoryToTemplate

func RepositoryToTemplate(r Repository, releaseName string) *SolutionTemplate

type SolutionTemplateConfig

type SolutionTemplateConfig struct {
	Repository     int               `json:"repository"`
	RequiredValues map[string]string `json:"required_values"`
	Namespace      string            `json:"namespace"`
	Values         string            `json:"values_yaml"`
	ChartPath      string            `json:"chart_path"`
	ReleaseName    string            `json:"release_name"`
	ChartName      string            `json:"chart_name"`
	Version        string            `json:"version"`
}

type SolutionTemplateDependencies

type SolutionTemplateDependencies struct {
	Name                   string   `json:"name"`
	Value                  string   `json:"value"`
	Available              bool     `json:"available"`
	KeysetRequired         bool     `json:"keysetRequired"`
	Tag                    string   `json:"tag"`
	IsPostBuildCompatible  bool     `json:"isPostBuildCompatible"`
	IsManagedIndependently bool     `json:"isManagedIndependently"`
	Dependencies           []string `json:"dependencies"`
}

type SolutionTemplateSpec

type SolutionTemplateSpec struct {
	Requirements SolutionTemplateSpecRequirements `json:"requirements"`
}

type SolutionTemplateSpecRequirements

type SolutionTemplateSpecRequirements struct {
	Node SolutionTemplateSpecRequirementsNode `json:"node"`
	App  SolutionTemplateSpecRequirementsApp  `json:"app"`
}

type SolutionTemplateSpecRequirementsApp

type SolutionTemplateSpecRequirementsApp struct {
	RBAC               bool     `json:"rbac"`
	Namespace          string   `json:"namespace"`
	ValuesEditRequired []string `json:"valuesEditRequired"`
	Storage            bool     `json:"storage"`
	LoadBalancer       bool     `json:"loadbalancer"`
}

type SolutionTemplateSpecRequirementsNode

type SolutionTemplateSpecRequirementsNode struct {
	Count int `json:"count"`
	CPU   int `json:"CPU"`
}

Jump to

Keyboard shortcuts

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