nks

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: Apache-2.0 Imports: 12 Imported by: 7

Documentation

Index

Constants

View Source
const (
	ClusterRunningStateString  = "running"
	ClusterBuildLogEventType   = "provider_build"
	ClusterBuildLogEventFailed = "failure"
)
View Source
const (
	SolutionInstalledStateString = "installed"
	HelmTillerInstallWaitTimeout = 240
	HelmTillerSolutionName       = "helm_tiller"
)
View Source
const BuildLogEventStateSuccess = "success"
View Source
const ClientUserAgentString = "NetApp Kubernetes Service Go SDK v2.0.4"
View Source
const NodePoolRunningStateString = "active"
View Source
const NodeRunningStateString = "running"

Variables

This section is empty.

Functions

func GetFormattedInstanceList

func GetFormattedInstanceList(instances []Instance) []string

GetFormattedInstanceList takes a list of Instance objects and makes a formatted list of strings for the user

func GetIDFromEnv

func GetIDFromEnv(name string) (int, error)

GetEnvID grabs string from environment and converts to integer

func InstanceInList

func InstanceInList(instances []Instance, i string) bool

InstanceInList returns true if instance is in list of Instances

func PrettyPrint

func PrettyPrint(v interface{})

PrettyPrint to break down objects

func StringInSlice

func StringInSlice(s string, list []string) bool

StringInSlice utlity function, like in_array, userful for validation of machine types

Types

type APIClient

type APIClient struct {
	Token      string
	Endpoint   string
	HttpClient *http.Client
}

APIClient references an api token and an http endpoint

func NewClient

func NewClient(token, endpoint string) *APIClient

NewClient returns a new api client

func NewClientFromEnv

func NewClientFromEnv() (*APIClient, error)

NewClientFromEnv creates a new client from environment variables

func (*APIClient) AddNode

func (c *APIClient) AddNode(orgID, clusterID int, newNode NodeAdd) (ns []Node, err error)

AddNodes sends a request to add master nodes to a cluster, returns list of Node objects created

func (*APIClient) AddNodesToNodePool

func (c *APIClient) AddNodesToNodePool(orgID, clusterID, nodepoolID int, newNode NodeAddToPool) (nodes []Node, err error)

AddNodesToNodePool sends a request to add worker nodes to a nodepool, returns list of Node objects created

func (*APIClient) AddSolution

func (c *APIClient) AddSolution(orgID, clusterID int, newSolution Solution) (sol *Solution, err error)

AddSolution sends a request to add a solution to a cluster, returns list of solutions added

func (*APIClient) AddSolutionFromJSON

func (c *APIClient) AddSolutionFromJSON(orgID, clusterID int, solJSON string) (sol *Solution, err error)

AddSolutionFromJSON sends a request to add a solution to a cluster using the supplied JSON, returns list of solutions added

func (*APIClient) CreateCluster

func (c *APIClient) CreateCluster(orgID int, cluster Cluster) (cl *Cluster, err error)

CreateCluster requests cluster creation

func (*APIClient) CreateIstioMesh

func (c *APIClient) CreateIstioMesh(orgID int, workspaceID int, mesh IstioMeshRequest) (m *IstioMesh, err error)

CreateIstioMesh creates an Istio mesh

func (*APIClient) CreateKeyset

func (c *APIClient) CreateKeyset(orgID int, keyset Keyset) (ks *Keyset, err error)

CreateKeyset creates keyset

func (*APIClient) CreateNodePool

func (c *APIClient) CreateNodePool(orgID, clusterID int, newPool NodePool) (np *NodePool, err error)

CreateNodePool creates a new nodepool for a cluster, returns NodePool object

func (*APIClient) CreateTeam

func (c *APIClient) CreateTeam(orgID int, team Team) (t *Team, err error)

CreateTeam creates a team

func (*APIClient) CreateWorkspace

func (c *APIClient) CreateWorkspace(orgID int, workspace Workspace) (ws *Workspace, err error)

CreateWorkspace creates a workspace

func (*APIClient) DeleteCluster

func (c *APIClient) DeleteCluster(orgID, clusterID int) (err error)

DeleteCluster deletes cluster

func (*APIClient) DeleteIstioMesh

func (c *APIClient) DeleteIstioMesh(orgID int, workspaceID int, meshID int) (err error)

DeleteIstioMesh deletes an Istio mesh

func (*APIClient) DeleteKeyset

func (c *APIClient) DeleteKeyset(orgID, keysetID int) (err error)

DeleteKeyset deletes keyset

func (*APIClient) DeleteNode

func (c *APIClient) DeleteNode(orgID, clusterID, nodeID int) (err error)

DeleteNode makes an API call to begin deleting a node

func (*APIClient) DeleteNodePool

func (c *APIClient) DeleteNodePool(orgID, clusterID, nodepoolID int) (err error)

DeleteNodePool deletes nodepool

func (*APIClient) DeleteSolution

func (c *APIClient) DeleteSolution(orgID, clusterID, solutionID int) (err error)

DeleteSolution makes an API call to begin deleting a solution

func (*APIClient) DeleteTeam

func (c *APIClient) DeleteTeam(orgID, teamID int) (err error)

DeleteTeam deletes a team

func (*APIClient) DeleteWorkspace

func (c *APIClient) DeleteWorkspace(orgID, workspaceID int) (err error)

DeleteWorkspace deletes workspace

func (*APIClient) FindSolutionByName

func (c *APIClient) FindSolutionByName(orgID, clusterID int, solutionName string) (int, error)

FindSolutionByName finds solution ID by name given

func (*APIClient) GetBuildLog

func (c *APIClient) GetBuildLog(bls []BuildLog, buildlogID int) (*BuildLog, error)

GetBuildLog retrieves buildlog entry for buildlog ID, or error if not found

func (*APIClient) GetBuildLogEventState

func (c *APIClient) GetBuildLogEventState(bls []BuildLog, eventType string) *BuildLog

GetBuildLogEventState takes a list of buildlogs, returns most recent build log entry that matches eventType string, or returns nil if not found

func (*APIClient) GetBuildLogs

func (c *APIClient) GetBuildLogs(orgID, clusterID int) (bls []BuildLog, err error)

GetBuildLogs gets the list of buildlog entries associated with a cluster and organization

func (*APIClient) GetCluster

func (c *APIClient) GetCluster(orgID, clusterID int) (cl *Cluster, err error)

GetCluster gets a single cluster by primary ID and organization

func (*APIClient) GetClusters

func (c *APIClient) GetClusters(orgID int) (cls []Cluster, err error)

GetClusters gets all clusters associated with an organization

func (*APIClient) GetInstanceSpecs

func (c *APIClient) GetInstanceSpecs(prov, endpoint string) ([]Instance, error)

GetMachSpecs returns list of machine types for cloud provider type

func (*APIClient) GetIstioMesh

func (c *APIClient) GetIstioMesh(orgID int, workspaceID int, meshID int) (m *IstioMesh, err error)

GetIstioMesh returns a mesh for Org ID, Workspace ID, and meshID

func (*APIClient) GetIstioMeshes

func (c *APIClient) GetIstioMeshes(orgID int, workspaceID int) (m []IstioMesh, err error)

GetIstioMeshes gets list of meshes for Org ID and Workspace ID

func (*APIClient) GetKeyset

func (c *APIClient) GetKeyset(orgID, keysetID int) (ks *Keyset, err error)

GetKeyset returns keyset for Org ID and Keyset ID

func (*APIClient) GetKeysets

func (c *APIClient) GetKeysets(orgID int) (kss []Keyset, err error)

GetKeysets gets list of keysets for Org ID

func (*APIClient) GetKubeConfig

func (c *APIClient) GetKubeConfig(orgID, clusterID int) (kubeconfig string, err error)

GetKubeConfig returns kubeconfig string.

func (*APIClient) GetNode

func (c *APIClient) GetNode(orgID, clusterID, nodeID int) (n *Node, err error)

GetNode retrieves data for a single node

func (*APIClient) GetNodePool

func (c *APIClient) GetNodePool(orgID, clusterID, nodepoolID int) (np *NodePool, err error)

GetNodePool gets a NodePool for a cluster, returns NodePool object

func (*APIClient) GetNodePools

func (c *APIClient) GetNodePools(orgID, clusterID int) (nps []NodePool, err error)

GetNodePools gets the NodePools for a cluster, returns list of NodePool objects

func (*APIClient) GetNodes

func (c *APIClient) GetNodes(orgID, clusterID int) (ns []Node, err error)

GetNodes gets the nodes associated with a cluster and organization

func (*APIClient) GetNodesInPool

func (c *APIClient) GetNodesInPool(orgID, clusterID, nodepoolID int) (rNodes []Node, err error)

GetNodesInPool returns a list of nodes that are in given nodepool ID

func (*APIClient) GetOrganization

func (c *APIClient) GetOrganization(orgID int) (org *Organization, err error)

GetOrganization gets the organization by the supplied org ID

func (*APIClient) GetOrganizations

func (c *APIClient) GetOrganizations() (orgs []Organization, err error)

GetOrganizations gets the organizations the API token is associated with

func (*APIClient) GetSolution

func (c *APIClient) GetSolution(orgID, clusterID, solutionID int) (sol *Solution, err error)

GetSolution retrieves data for a single solution

func (*APIClient) GetSolutions

func (c *APIClient) GetSolutions(orgID, clusterID int) (sols []Solution, err error)

GetSolutions gets the solutions associated with a cluster and organization

func (*APIClient) GetTeam

func (c *APIClient) GetTeam(orgID, teamID int) (t *Team, err error)

GetTeam returns team for Org ID and Team ID

func (*APIClient) GetTeams

func (c *APIClient) GetTeams(orgID int) (team []Team, err error)

GetTeams gets list of workspaces for Org ID

func (*APIClient) GetUserProfile

func (c *APIClient) GetUserProfile() (up []UserProfile, err error)

GetUserProfile gets user profile for user (based on API token)

func (*APIClient) GetUserProfileDefaultOrg

func (c *APIClient) GetUserProfileDefaultOrg(up *UserProfile) (int, error)

GetUserProfileDefaultOrg returns default organization ID for user profile

func (*APIClient) GetUserProfileKeysetID

func (c *APIClient) GetUserProfileKeysetID(up *UserProfile, prov string) (int, error)

GetUserProfileKeyset returns first keyset matching provider string

func (*APIClient) GetWorkspace

func (c *APIClient) GetWorkspace(orgID, workspaceID int) (ws *Workspace, err error)

GetWorkspace returns workspace for Org ID and Workspace ID

func (*APIClient) GetWorkspaces

func (c *APIClient) GetWorkspaces(orgID int) (workspace []Workspace, err error)

GetWorkspaces gets list of workspaces for Org ID

func (*APIClient) UpgradeClusterToLatestVersion

func (c *APIClient) UpgradeClusterToLatestVersion(cl Cluster) error

UpgradeClusterToLatestVersion upgrades cluster to latest k8s version available

func (*APIClient) UpgradeClusterToVersion

func (c *APIClient) UpgradeClusterToVersion(cl Cluster, version string) (err error)

UpgradeClusterToVersion upgrades cluster to supplied k8s version

func (*APIClient) WaitBuildLogEventSuccess

func (c *APIClient) WaitBuildLogEventSuccess(orgID, clusterID, timeout int, eventType string) error

WaitEventSuccess waits until event type has success state

func (*APIClient) WaitClusterDeleted

func (c *APIClient) WaitClusterDeleted(orgID, clusterID, timeout int) error

WaitClusterDeleted waits until cluster disappears

func (*APIClient) WaitClusterRunning

func (c *APIClient) WaitClusterRunning(orgID, clusterID int, isProvisioning bool, timeout int) error

WaitClusterRunning waits until cluster reaches the running state (configured as const above)

func (*APIClient) WaitHelmTillerInstalled

func (c *APIClient) WaitHelmTillerInstalled(orgID, clusterID, timeout int) error

WaitHelmTillerInstalled waits until Tiller is installed, or errors if Tiller is not installed or not going to install, since Tiller is needed for any Helm install

func (*APIClient) WaitNodeDeleted

func (c *APIClient) WaitNodeDeleted(orgID, clusterID, nodeID, timeout int) error

WaitNodeDeleted waits until node disappears

func (*APIClient) WaitNodePoolProvisioned

func (c *APIClient) WaitNodePoolProvisioned(orgID, clusterID, nodepoolID, timeout int) error

WaitNodePoolProvisioned waits until nodepool reaches the running state (configured as const above)

func (*APIClient) WaitNodeProvisioned

func (c *APIClient) WaitNodeProvisioned(orgID, clusterID, nodeID, timeout int) error

WaitNodeProvisioned waits until node reaches the running state (configured as const above)

func (*APIClient) WaitSolutionDeleted

func (c *APIClient) WaitSolutionDeleted(orgID, clusterID, solutionID, timeout int) error

WaitSolutionDeleted waits until solution disappears

func (*APIClient) WaitSolutionInstalled

func (c *APIClient) WaitSolutionInstalled(orgID, clusterID, solutionID, timeout int) error

WaitSolutionInstalled waits until solution is installed

type APIReq

type APIReq struct {
	Method         string
	Path           string
	PostObj        interface{}
	Payload        io.Reader
	ResponseObj    interface{}
	WantedStatus   int
	ResponseString string
	DontUnmarsahal bool
}

APIReq struct holds data for runRequest method to operate http request on

type BuildLog

type BuildLog struct {
	ID            int       `json:"pk"`
	ClusterID     int       `json:"cluster"`
	EventCategory string    `json:"event_category"`
	EventType     string    `json:"event_type"`
	EventState    string    `json:"event_state"`
	Message       string    `json:"message"`
	Details       string    `json:"details"`
	Reference     string    `json:"reference"`
	Created       time.Time `json:"created"`
}

BuildLog struct to hold buildlog entry

type Cluster

type Cluster struct {
	ID                          int                `json:"pk"`
	Name                        string             `json:"name"`
	OrganizationKey             int                `json:"org"`
	InstanceID                  string             `json:"instance_id"`
	Provider                    string             `json:"provider"`
	ProviderKey                 int                `json:"provider_keyset"`
	ProviderKeyName             string             `json:"provider_keyset_name"`
	ProviderResourceGp          string             `json:"provider_resource_group,omitempty"`
	ProviderNetworkID           string             `json:"provider_network_id,omitempty"`
	ProviderNetworkCdr          string             `json:"provider_network_cidr,omitempty"`
	ProviderSubnetID            string             `json:"provider_subnet_id,omitempty"`
	ProviderSubnetCidr          string             `json:"provider_subnet_cidr,omitempty"`
	ProviderBalancerID          string             `json:"provider_balancer_id,omitempty"`
	Region                      string             `json:"region"`
	Zone                        string             `json:"zone,omitempty"`
	State                       string             `json:"state,omitempty"`
	IsFailed                    bool               `json:"is_failed"`
	ProjectID                   string             `json:"project_id,omitempty"`
	Owner                       int                `json:"owner"`
	Notified                    bool               `json:"notified,omitempty"`
	KubernetesVersion           string             `json:"k8s_version"`
	Created                     time.Time          `json:"created"`
	Updated                     time.Time          `json:"updated,omitempty"`
	DashboardEnabled            bool               `json:"k8s_dashboard_enabled"`
	DashboardInstalled          bool               `json:"k8s_dashboard_installed"`
	KubeconfigPath              string             `json:"kubeconfig_path"`
	RbacEnabled                 bool               `json:"k8s_rbac_enabled"`
	MasterCount                 int                `json:"master_count"`
	WorkerCount                 int                `json:"worker_count"`
	MasterSize                  string             `json:"master_size"`
	WorkerSize                  string             `json:"worker_size"`
	NodeCount                   int                `json:"node_count"`
	MaxNodeCount                int                `json:"max_node_count"`
	MinNodeCount                int                `json:"min_node_count"`
	EtcdType                    string             `json:"etcd_type"`
	Platform                    string             `json:"platform"`
	Image                       string             `json:"image"`
	Channel                     string             `json:"channel"`
	SSHKeySet                   int                `json:"user_ssh_keyset"`
	Solutions                   []Solution         `json:"solutions"`
	NetworkComponents           []NetworkComponent `json:"network_components"`
	KubernetesMigrationVersions []string           `json:"version_migrations"`
}

Cluster describes a Kubernetes cluster in the NetApp Kubernetes Service system

type Federation

type Federation struct {
	ID    int    `json:"pk"`
	Name  string `json:"name"`
	State string `json:"state"`
}

Federation struct

type Instance

type Instance struct {
	Name  string
	Specs MachineSpecs
}

type IstioMesh

type IstioMesh struct {
	ID        int         `json:"pk"`
	Name      string      `json:"name"`
	MeshType  string      `json:"mesh_type"`
	Org       int         `json:"org"`
	Workspace Workspace   `json:"workspace"`
	Members   []Member    `json:"members"`
	State     string      `json:"state,omitempty"`
	Config    interface{} `json:"config,omitempty"`
	Errors    interface{} `json:"errors,omitempty"`
	Created   time.Time   `json:"created"`
	Updated   time.Time   `json:"updated"`
}

IstioMesh struct

type IstioMeshRequest

type IstioMeshRequest struct {
	Name      string          `json:"name"`
	MeshType  string          `json:"mesh_type"`
	Members   []MemberRequest `json:"members"`
	Workspace int             `json:"workspace"`
}

IstioMeshRequest object used to create an istio mesh

type Key

type Key struct {
	ID          int    `json:"pk"`
	Type        string `json:"key_type"`
	Value       string `json:"key"`
	Fingerprint string `json:"fingerprint"`
	User        int    `json:"user"`
}

Key struct

type Keyset

type Keyset struct {
	Name       string `json:"name"`
	ID         int    `json:"pk"`
	Category   string `json:"category"`
	Entity     string `json:"entity"`
	Org        int    `json:"org"`
	Workspaces []int  `json:"workspaces"`
	User       int    `json:"user"`
	IsDefault  bool   `json:"is_default"`
	Keys       []Key  `json:"keys"`
	Created    string `json:"created"`
}

Keyset struct

type MachineSpecs

type MachineSpecs struct {
	Memory int
	CPU    int
	Name   string
}

type Member

type Member struct {
	ID      int         `json:"pk,omitempty"`
	Mesh    int         `json:"mesh,omitempty"`
	Gateway string      `json:"gateway,omitempty"`
	Role    string      `json:"role,omitempty"`
	Cluster Cluster     `json:"cluster,omitempty"`
	State   string      `json:"state,omitempty"`
	Config  interface{} `json:"config,omitempty"`
	Errors  interface{} `json:"errors,omitempty"`
	Created time.Time   `json:"created,omitempty"`
	Updated time.Time   `json:"updated,omitempty"`
}

Member struct

type MemberRequest

type MemberRequest struct {
	Role    string `json:"role,omitempty"`
	Cluster int    `json:"cluster,omitempty"`
}

MemberRequest object used to by IstioMeshRequest to create an istio mesh

type Membership

type Membership struct {
	ID      int       `json:"pk"`
	User    User      `json:"user"`
	Team    int       `json:"team"`
	Created time.Time `json:"created"`
}

Membership struct

type NetworkComponent

type NetworkComponent struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	Cidr          string `json:"cidr"`
	ComponentType string `json:"component_type"`
	ProviderID    string `json:"provider_id"`
	VpcID         string `json:"vpcId"`
	Zone          string `json:"zone"`
}

NetworkComponent describes a network configuration

type Node

type Node struct {
	ID                 int       `json:"pk"`
	Name               string    `json:"name,omitempty"`
	ClusterID          int       `json:"cluster"`
	InstanceID         string    `json:"instance_id"`
	NodePoolID         int       `json:"pool,omitempty"`
	NodePoolName       string    `json:"pool_name,omitempty"`
	Role               string    `json:"role"`
	Group              string    `json:"group_name,omitempty"`
	PrivateIP          string    `json:"private_ip"`
	PublicIP           string    `json:"public_ip"`
	Platform           string    `json:"platform"`
	Image              string    `json:"image"`
	Location           string    `json:"location"` // "location": "us-east-2:us-east-2a",
	ProviderSubnetID   string    `json:"provider_subnet_id,omitempty"`
	ProviderSubnetCidr string    `json:"provider_subnet_cidr,omitempty"`
	Size               string    `json:"size"`
	State              string    `json:"state,omitempty"`
	Created            time.Time `json:"created"`
	Updated            time.Time `json:"updated,omitempty"`
}

Node describes a node in a cluster. The string field Size is provider-specific

type NodeAdd

type NodeAdd struct {
	Size               string `json:"size"`
	Count              int    `json:"node_count"`
	Group              string `json:"group,omitempty"`
	Role               string `json:"role,omitempty"`
	Zone               string `json:"zone,omitempty"`
	ProviderSubnetID   string `json:"provider_subnet_id,omitempty"`
	ProviderSubnetCidr string `json:"provider_subnet_cidr,omitempty"`
}

NodeAdd is used for adding master nodes only (endpoint /clusters/<cluster_id>/add_node)

type NodeAddToPool

type NodeAddToPool struct {
	Count              int    `json:"node_count"`
	Group              string `json:"group,omitempty"`
	NodePoolID         int    `json:"node_pool"`
	Role               string `json:"role,omitempty"`
	Zone               string `json:"zone,omitempty"`
	ProviderSubnetID   string `json:"provider_subnet_id,omitempty"`
	ProviderSubnetCidr string `json:"provider_subnet_cidr,omitempty"`
}

NodeAddToPool is used for adding worker nodes to pools (endpoint /clusters/<cluster_id>/nodepools/add)

type NodePool

type NodePool struct {
	ID                 int       `json:"pk"`
	Name               string    `json:"name"`
	ClusterID          int       `json:"cluster"`
	InstanceID         string    `json:"instance_id"`
	Size               string    `json:"instance_size"`
	CPU                string    `json:"cpu,omitempty"`
	Memory             string    `json:"memory,omitempty"`
	Labels             string    `json:"labels,omitempty"`
	Autoscaled         bool      `json:"autoscaled"`
	MinCount           int       `json:"min_count,omitempty"`
	MaxCount           int       `json:"max_count,omitempty"`
	Zone               string    `json:"zone,omitempty"`
	ProviderSubnetID   string    `json:"provider_subnet_id,omitempty"`
	ProviderSubnetCidr string    `json:"provider_subnet_cidr,omitempty"`
	NodeCount          int       `json:"node_count"`
	Platform           string    `json:"platform"`
	Channel            string    `json:"channel"`
	Role               string    `json:"role,omitempty"`
	State              string    `json:"state,omitempty"`
	Default            bool      `json:"is_default"`
	Created            time.Time `json:"created"`
	Updated            time.Time `json:"updated,omitempty"`
	Deleted            time.Time `json:"deleted,omitempty"`
}

NodePool defines the characteristics of a grouping of nodes

type OrgMembership

type OrgMembership struct {
	ID        int          `json:"pk"`
	User      int          `json:"user"`
	Org       Organization `json:"org"`
	Role      string       `json:"role"`
	IsOwner   bool         `json:"is_owner"`
	IsManager bool         `json:"is_manager"`
	IsDefault bool         `json:"is_default"`
}

type Organization

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

Organization is the top level of the hierarchy

type ProviderSpecs

type ProviderSpecs struct {
	Name    string      `json:"name"`
	Filters interface{} `json:"filters"`
	Config  interface{} `json:"config"`
}

Provider instance structs

type Solution

type Solution struct {
	ID         int       `json:"pk"`
	Name       string    `json:"name"`
	InstanceID string    `json:"instance_id"`
	Solution   string    `json:"solution"`
	Installer  string    `json:"installer"`
	State      string    `json:"state,omitempty"`
	URL        string    `json:"url,omitempty"`
	Deleteable bool      `json:"is_deleteable"`
	Keyset     int       `json:"keyset,omitempty"` // only for turbonomic and sysdig
	KeysetName string    `json:"keyset_name,omitempty"`
	MaxNodes   int       `json:"max_nodes,omitempty"` // only for autoscaler
	Created    time.Time `json:"created"`
	Updated    time.Time `json:"updated,omitempty"`
}

Solution struct to hold software packages running on a cluster

type Team

type Team struct {
	ID          int          `json:"pk"`
	Name        string       `json:"name"`
	Slug        string       `json:"slug"`
	Org         int          `json:"org"`
	IsOrgWide   bool         `json:"is_org_wide"`
	Created     time.Time    `json:"created"`
	Memberships []Membership `json:"memberships"`
}

Team struct

type TeamWorkspace

type TeamWorkspace struct {
	ID        int       `json:"pk"`
	Team      Team      `json:"team"`
	Workspace int       `json:"workspace"`
	Created   time.Time `json:"creaated"`
}

TeamWorkspace struct

type User

type User struct {
	ID         int       `json:"pk"`
	Username   string    `json:"username"`
	Email      string    `json:"email"`
	FirstName  string    `json:"first_name"`
	LastName   string    `json:"last_name"`
	FullName   string    `json:"full_name"`
	DateJoined time.Time `json:"date_joined"`
}

User struct

type UserProfile

type UserProfile struct {
	ID        int             `json:"pk"`
	Username  string          `json:"username"`
	Email     string          `json:"email"`
	FirstName string          `json:"first_name"`
	LastName  string          `json:"last_name"`
	FullName  string          `json:"full_name"`
	OrgMems   []OrgMembership `json:"org_memberships"`
	Keysets   []Keyset        `json:"keysets"`
}

UserProfile struct

type Workspace

type Workspace struct {
	ID             int             `json:"pk"`
	Name           string          `json:"name"`
	Slug           string          `json:"slug"`
	Org            int             `json:"org"`
	IsDefault      bool            `json:"is_default"`
	Created        time.Time       `json:"created"`
	Clusters       []Cluster       `json:"clusters"`
	UserSolutions  []int           `json:"user_solutions"`
	TeamWorkspaces []TeamWorkspace `json:"team_workspaces"`
	Federations    []Federation    `json:"federations"`
}

Workspace struct

Jump to

Keyboard shortcuts

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