Documentation ¶
Index ¶
- Constants
- func GetValidRoles() map[UserRole]bool
- func ValidateRole(role UserRole) error
- type ApiKey
- type ApiKeyCollection
- type ApiKeyInput
- type ApiKeyService
- type ApiKeyServiceClient
- type AuthError
- type AutoscalingSettings
- type CallOption
- type Client
- type ClientOption
- type Cluster
- type ClusterIdentity
- type ClusterInput
- type ClusterList
- type ClusterNodePoolInput
- type ClusterService
- type ClusterServiceClient
- func (c *ClusterServiceClient) Create(input *ClusterInput) (*Cluster, error)
- func (c *ClusterServiceClient) CreateServiceAccount(clusterName string, subjectId string) (*ServiceAccount, error)
- func (c *ClusterServiceClient) CreateServiceAccountForSelf(clusterName string) (*ServiceAccount, error)
- func (c *ClusterServiceClient) Delete(clusterName string) error
- func (c *ClusterServiceClient) DeleteServiceAccount(clusterName string, serviceAccountId string) error
- func (c *ClusterServiceClient) Describe(clusterName string) (*Cluster, error)
- func (c *ClusterServiceClient) DescribeById(id string) (*Cluster, error)
- func (c *ClusterServiceClient) GetIdentity(clusterName string) (*ClusterIdentity, error)
- func (c *ClusterServiceClient) GetServiceAccount(clusterName string, serviceAccountId string) (*ServiceAccount, error)
- func (c *ClusterServiceClient) List(maxSize int, page int) (*ClusterList, error)
- func (c *ClusterServiceClient) ListNodes(clusterName string) (*NodeList, error)
- func (c *ClusterServiceClient) ListUserServiceAccounts(clusterName string) ([]*UserServiceAccount, error)
- type Configuration
- type GenericError
- type Invite
- type Node
- type NodeLabel
- type NodeList
- type NodePool
- type NodePoolInput
- type NodePoolService
- type NodePoolServiceClient
- func (n *NodePoolServiceClient) Create(input *NodePoolInput) (*NodePool, error)
- func (n *NodePoolServiceClient) Delete(nodePoolId string) error
- func (n *NodePoolServiceClient) Describe(id string) (*NodePool, error)
- func (n *NodePoolServiceClient) Update(nodePoolId string, input *NodePoolUpdateInput) error
- type NodePoolUpdateInput
- type NodeService
- type NodeServiceClient
- type NodeTaint
- type NodeType
- type NotFoundError
- type Product
- type ProductCost
- type Project
- type ProjectEnvironment
- type ProjectService
- type ProjectServiceClient
- type Region
- type RegionService
- type RegionServiceClient
- type SchedulerEffect
- type Secret
- type SecretCollection
- type SecretService
- type SecretServiceClient
- func (n *SecretServiceClient) Create(project string, secretKey string, input Secret) error
- func (n *SecretServiceClient) GetSecretsByProject(project string) (SecretCollection, error)
- func (n *SecretServiceClient) GetSecretsByProjectAndEnvironment(project string, environment ProjectEnvironment) (map[string]string, error)
- type ServiceAccount
- type ServiceAccountInput
- type SortAndPageable
- type SymbiosisClient
- type TeamMember
- type TeamService
- type TeamServiceClient
- func (t *TeamServiceClient) ChangeRole(email string, role UserRole) error
- func (t *TeamServiceClient) DeleteMember(email string) error
- func (t *TeamServiceClient) GetInvitationByEmail(email string) (*TeamMember, error)
- func (t *TeamServiceClient) GetMemberByEmail(email string) (*TeamMember, error)
- func (t *TeamServiceClient) InviteMembers(emails []string, role UserRole) ([]*TeamMember, error)
- type UserRole
- type UserServiceAccount
Constants ¶
View Source
const ( APIEndpoint = "https://api.symbiosis.host" StagingAPIEndpoint = "https://api.staging.symbiosis.host" )
View Source
const RegionJson = `{
"id": "random-uuid",
"name": "germany-1"
}`
Variables ¶
This section is empty.
Functions ¶
func GetValidRoles ¶
func ValidateRole ¶
Types ¶
type ApiKeyCollection ¶ added in v1.1.6
type ApiKeyCollection []*ApiKey
type ApiKeyInput ¶ added in v1.1.6
type ApiKeyService ¶ added in v1.1.6
type ApiKeyService interface { Create(input ApiKeyInput) (*ApiKey, error) List() (ApiKeyCollection, error) Delete(id string) error }
type ApiKeyServiceClient ¶ added in v1.1.6
type ApiKeyServiceClient struct {
// contains filtered or unexported fields
}
func (*ApiKeyServiceClient) Create ¶ added in v1.1.6
func (n *ApiKeyServiceClient) Create(input ApiKeyInput) (*ApiKey, error)
func (*ApiKeyServiceClient) Delete ¶ added in v1.1.6
func (n *ApiKeyServiceClient) Delete(id string) error
func (*ApiKeyServiceClient) List ¶ added in v1.1.6
func (n *ApiKeyServiceClient) List() (ApiKeyCollection, error)
type AutoscalingSettings ¶ added in v1.0.9
type CallOption ¶
type CallOption func(req *resty.Request)
func WithBody ¶
func WithBody(body interface{}) CallOption
type Client ¶
type Client struct { Team TeamService Cluster ClusterService NodePool NodePoolService Node NodeService Secret SecretService Project ProjectService Region RegionService ApiKeys ApiKeyService // contains filtered or unexported fields }
func NewClientFromAPIKey ¶
func NewClientFromAPIKey(apiKey string, opts ...ClientOption) (*Client, error)
func NewClientFromToken ¶ added in v1.0.13
func NewClientFromToken(token string, teamId string, opts ...ClientOption) (*Client, error)
func (*Client) Call ¶
func (c *Client) Call(route string, method string, targetInterface interface{}, opts ...CallOption) error
func (*Client) ValidateResponse ¶
type ClientOption ¶
type ClientOption func(c *resty.Client)
func WithEndpoint ¶
func WithEndpoint(endpoint string) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
type Cluster ¶
type Cluster struct { ID string `json:"id"` Name string `json:"name"` KubeVersion string `json:"kubeVersion"` APIServerEndpoint string `json:"apiServerEndpoint"` State string `json:"state"` Region *Region `json:"region"` Nodes []*Node `json:"nodes"` NodePools []*NodePool `json:"nodePools"` CreatedAt time.Time `json:"createdAt"` IsHighlyAvailable bool `json:"isHighlyAvailable"` }
type ClusterIdentity ¶ added in v1.0.4
type ClusterInput ¶
type ClusterInput struct { Name string `json:"name"` KubeVersion string `json:"kubeVersion"` Region string `json:"regionName"` Nodes []ClusterNodePoolInput `json:"nodes"` IsHighlyAvailable bool `json:"isHighlyAvailable"` }
type ClusterList ¶
type ClusterList struct { Clusters []*Cluster `json:"content"` *SortAndPageable }
type ClusterNodePoolInput ¶ added in v1.1.1
type ClusterService ¶
type ClusterService interface { List(maxSize int, page int) (*ClusterList, error) Describe(clusterName string) (*Cluster, error) DescribeById(id string) (*Cluster, error) Create(input *ClusterInput) (*Cluster, error) Delete(clusterName string) error ListNodes(clusterName string) (*NodeList, error) CreateServiceAccountForSelf(clusterName string) (*ServiceAccount, error) GetServiceAccount(clusterName string, serviceAccountId string) (*ServiceAccount, error) CreateServiceAccount(clusterName string, subjectId string) (*ServiceAccount, error) DeleteServiceAccount(clusterName string, serviceAccountId string) error ListUserServiceAccounts(clusterName string) ([]*UserServiceAccount, error) GetIdentity(clusterName string) (*ClusterIdentity, error) }
type ClusterServiceClient ¶ added in v1.0.10
type ClusterServiceClient struct {
// contains filtered or unexported fields
}
func (*ClusterServiceClient) Create ¶ added in v1.0.10
func (c *ClusterServiceClient) Create(input *ClusterInput) (*Cluster, error)
func (*ClusterServiceClient) CreateServiceAccount ¶ added in v1.0.10
func (c *ClusterServiceClient) CreateServiceAccount(clusterName string, subjectId string) (*ServiceAccount, error)
func (*ClusterServiceClient) CreateServiceAccountForSelf ¶ added in v1.0.10
func (c *ClusterServiceClient) CreateServiceAccountForSelf(clusterName string) (*ServiceAccount, error)
func (*ClusterServiceClient) Delete ¶ added in v1.0.10
func (c *ClusterServiceClient) Delete(clusterName string) error
func (*ClusterServiceClient) DeleteServiceAccount ¶ added in v1.0.10
func (c *ClusterServiceClient) DeleteServiceAccount(clusterName string, serviceAccountId string) error
func (*ClusterServiceClient) Describe ¶ added in v1.0.10
func (c *ClusterServiceClient) Describe(clusterName string) (*Cluster, error)
func (*ClusterServiceClient) DescribeById ¶ added in v1.0.10
func (c *ClusterServiceClient) DescribeById(id string) (*Cluster, error)
func (*ClusterServiceClient) GetIdentity ¶ added in v1.0.10
func (c *ClusterServiceClient) GetIdentity(clusterName string) (*ClusterIdentity, error)
func (*ClusterServiceClient) GetServiceAccount ¶ added in v1.0.10
func (c *ClusterServiceClient) GetServiceAccount(clusterName string, serviceAccountId string) (*ServiceAccount, error)
func (*ClusterServiceClient) List ¶ added in v1.0.10
func (c *ClusterServiceClient) List(maxSize int, page int) (*ClusterList, error)
func (*ClusterServiceClient) ListNodes ¶ added in v1.0.10
func (c *ClusterServiceClient) ListNodes(clusterName string) (*NodeList, error)
func (*ClusterServiceClient) ListUserServiceAccounts ¶ added in v1.0.10
func (c *ClusterServiceClient) ListUserServiceAccounts(clusterName string) ([]*UserServiceAccount, error)
type Configuration ¶ added in v1.1.3
type Configuration struct {
ProductionBranch string `json:"productionBranch"`
}
type GenericError ¶
type GenericError struct { Status int32 `json:"status"` ErrorType string `json:"error"` Message string `json:"message"` Path string `json:"path"` }
func (*GenericError) Error ¶
func (e *GenericError) Error() string
type NodeList ¶
type NodeList struct { Nodes []*Node `json:"content"` *SortAndPageable }
type NodePool ¶
type NodePool struct { ID string `json:"id"` Name string `json:"name"` NodeTypeName string `json:"nodeTypeName"` ClusterName string `json:"clusterName"` DesiredQuantity int `json:"desiredQuantity"` Labels []*NodeLabel `json:"labels"` Taints []*NodeTaint `json:"taints"` Nodes []*Node `json:"nodes"` Autoscaling AutoscalingSettings `json:"autoscaling"` }
type NodePoolInput ¶
type NodePoolService ¶
type NodePoolServiceClient ¶ added in v1.0.10
type NodePoolServiceClient struct {
// contains filtered or unexported fields
}
func (*NodePoolServiceClient) Create ¶ added in v1.0.10
func (n *NodePoolServiceClient) Create(input *NodePoolInput) (*NodePool, error)
func (*NodePoolServiceClient) Delete ¶ added in v1.0.10
func (n *NodePoolServiceClient) Delete(nodePoolId string) error
func (*NodePoolServiceClient) Describe ¶ added in v1.0.10
func (n *NodePoolServiceClient) Describe(id string) (*NodePool, error)
func (*NodePoolServiceClient) Update ¶ added in v1.0.10
func (n *NodePoolServiceClient) Update(nodePoolId string, input *NodePoolUpdateInput) error
type NodePoolUpdateInput ¶
type NodePoolUpdateInput struct { Name string `json:"name,omitempty"` Quantity int `json:"quantity"` Autoscaling AutoscalingSettings `json:"autoscaling"` }
type NodeService ¶
type NodeServiceClient ¶ added in v1.0.10
type NodeServiceClient struct {
// contains filtered or unexported fields
}
func (*NodeServiceClient) Delete ¶ added in v1.0.10
func (n *NodeServiceClient) Delete(name string) error
func (*NodeServiceClient) Describe ¶ added in v1.0.10
func (n *NodeServiceClient) Describe(name string) (*Node, error)
func (*NodeServiceClient) Recycle ¶ added in v1.0.10
func (n *NodeServiceClient) Recycle(name string) error
func (*NodeServiceClient) Types ¶ added in v1.1.4
func (n *NodeServiceClient) Types() ([]NodeType, error)
type NodeTaint ¶ added in v1.0.5
type NodeTaint struct { Key string `json:"key"` Value string `json:"value"` Effect SchedulerEffect `json:"effect"` }
type NotFoundError ¶
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type Product ¶
type Product struct {
ProductCosts []*ProductCost `json:"productCosts"`
}
type ProductCost ¶
type Project ¶ added in v1.1.3
type Project struct { ID string `json:"id"` Name string `json:"name"` Owner string `json:"owner"` Repository string `json:"repository"` Configuration Configuration `json:"configuration"` ProductionClusterID interface{} `json:"productionClusterId"` }
type ProjectEnvironment ¶ added in v1.1.2
type ProjectEnvironment string
const ( ENVIRONMENT_DEVELOPMENT ProjectEnvironment = "development" ENVIRONMENT_PREVIEW ProjectEnvironment = "preview" ENVIRONMENT_PRODUCTION ProjectEnvironment = "production" )
type ProjectService ¶ added in v1.1.3
type ProjectServiceClient ¶ added in v1.1.3
type ProjectServiceClient struct {
// contains filtered or unexported fields
}
func (*ProjectServiceClient) Describe ¶ added in v1.1.3
func (n *ProjectServiceClient) Describe(projectName string) (*Project, error)
func (*ProjectServiceClient) List ¶ added in v1.1.3
func (n *ProjectServiceClient) List() ([]*Project, error)
type RegionService ¶ added in v1.1.4
type RegionServiceClient ¶ added in v1.1.4
type RegionServiceClient struct {
// contains filtered or unexported fields
}
func (*RegionServiceClient) List ¶ added in v1.1.4
func (n *RegionServiceClient) List() ([]Region, error)
type SchedulerEffect ¶ added in v1.0.5
type SchedulerEffect string
const ( EFFECT_NO_SCHEDULE SchedulerEffect = "NoSchedule" EFFECT_PREFER_NO_SCHEDULE SchedulerEffect = "PreferNoSchedule" EFFECT_NO_EXECUTE SchedulerEffect = "NoExecute" )
type SecretCollection ¶ added in v1.1.2
type SecretService ¶ added in v1.1.2
type SecretServiceClient ¶ added in v1.1.2
type SecretServiceClient struct {
// contains filtered or unexported fields
}
func (*SecretServiceClient) Create ¶ added in v1.1.2
func (n *SecretServiceClient) Create(project string, secretKey string, input Secret) error
func (*SecretServiceClient) GetSecretsByProject ¶ added in v1.1.2
func (n *SecretServiceClient) GetSecretsByProject(project string) (SecretCollection, error)
func (*SecretServiceClient) GetSecretsByProjectAndEnvironment ¶ added in v1.1.2
func (n *SecretServiceClient) GetSecretsByProjectAndEnvironment(project string, environment ProjectEnvironment) (map[string]string, error)
type ServiceAccount ¶
type ServiceAccountInput ¶
type ServiceAccountInput struct {
SubjectId string `json:"subjectId"`
}
type SortAndPageable ¶
type SortAndPageable struct { Pageable struct { Sort struct { Sorted bool `json:"sorted"` Unsorted bool `json:"unsorted"` Empty bool `json:"empty"` } `json:"sort"` PageNumber int `json:"pageNumber"` PageSize int `json:"pageSize"` Offset int `json:"offset"` Paged bool `json:"paged"` Unpaged bool `json:"unpaged"` } `json:"pageable"` TotalPages int `json:"totalPages"` TotalElements int `json:"totalElements"` Last bool `json:"last"` Sort struct { Sorted bool `json:"sorted"` Unsorted bool `json:"unsorted"` Empty bool `json:"empty"` } `json:"sort"` NumberOfElements int `json:"numberOfElements"` First bool `json:"first"` Size int `json:"size"` Number int `json:"number"` Empty bool `json:"empty"` }
type SymbiosisClient ¶ added in v1.0.10
type SymbiosisClient interface {
NewClientFromAPIKey(apiKey string, opts ...ClientOption) (*Client, error)
}
type TeamMember ¶
type TeamService ¶
type TeamService interface { GetMemberByEmail(email string) (*TeamMember, error) GetInvitationByEmail(email string) (*TeamMember, error) InviteMembers(emails []string, role UserRole) ([]*TeamMember, error) DeleteMember(email string) error ChangeRole(email string, role UserRole) error }
type TeamServiceClient ¶ added in v1.0.10
type TeamServiceClient struct {
// contains filtered or unexported fields
}
func (*TeamServiceClient) ChangeRole ¶ added in v1.0.10
func (t *TeamServiceClient) ChangeRole(email string, role UserRole) error
func (*TeamServiceClient) DeleteMember ¶ added in v1.0.10
func (t *TeamServiceClient) DeleteMember(email string) error
func (*TeamServiceClient) GetInvitationByEmail ¶ added in v1.0.10
func (t *TeamServiceClient) GetInvitationByEmail(email string) (*TeamMember, error)
func (*TeamServiceClient) GetMemberByEmail ¶ added in v1.0.10
func (t *TeamServiceClient) GetMemberByEmail(email string) (*TeamMember, error)
func (*TeamServiceClient) InviteMembers ¶ added in v1.0.10
func (t *TeamServiceClient) InviteMembers(emails []string, role UserRole) ([]*TeamMember, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.