Documentation
¶
Index ¶
- Variables
- func GetClusterMemberRoleValues() []string
- func GetMemberRoleValues() []string
- type AddClusterMemberRequest
- type AddClusterMemberSubject
- type AddClusterMembersPayload
- type AddMemberSubject
- type AddTeamMemberRequest
- type Client
- type Cluster
- type ClusterClient
- type ClusterList
- type ClusterMember
- type ClusterMemberRole
- type ClusterMemberSubject
- type ClusterStatus
- type ComputeResources
- type DeleteTeamRequest
- type IntegrationClient
- type IntegrationInstance
- type Me
- type MeClient
- type MemberClient
- type MemberRole
- type NewClusterRequest
- type NewTeamRequest
- type NodePool
- type NodePools
- type RequestError
- type RestClient
- func (c *RestClient) AddClusterMember(ctx context.Context, clusterID string, request []AddClusterMemberRequest) error
- func (c *RestClient) AddTeamMember(ctx context.Context, teamID string, request []AddTeamMemberRequest) error
- func (c *RestClient) CreateCluster(ctx context.Context, request NewClusterRequest) (*Cluster, error)
- func (c *RestClient) CreateTeam(ctx context.Context, request NewTeamRequest) (*Team, error)
- func (c *RestClient) DeleteCluster(ctx context.Context, id string) error
- func (c *RestClient) DeleteTeam(ctx context.Context, request DeleteTeamRequest) error
- func (c *RestClient) GetCluster(ctx context.Context, name string) (*Cluster, error)
- func (c *RestClient) GetClusterMembers(ctx context.Context, clusterID string) ([]ClusterMember, error)
- func (c *RestClient) GetClusterStatus(ctx context.Context, clusterID string) (*Cluster, error)
- func (c *RestClient) GetMe(ctx context.Context) (Me, error)
- func (c *RestClient) GetTeam(ctx context.Context, name string) (*Team, error)
- func (c *RestClient) GetTeamMembers(ctx context.Context, teamID string) ([]TeamMember, error)
- func (c *RestClient) GetUser(ctx context.Context, upn string) (*User, error)
- func (c *RestClient) ListClusters(ctx context.Context) (ClusterList, error)
- func (c *RestClient) ListIntegrationInstances(ctx context.Context) ([]IntegrationInstance, error)
- func (c *RestClient) ListTeams(ctx context.Context) ([]Team, error)
- func (c *RestClient) ListUsers(ctx context.Context) ([]User, error)
- func (c *RestClient) RemoveClusterMember(ctx context.Context, clusterID string, memberID string) error
- func (c *RestClient) RemoveTeamMember(ctx context.Context, teamID string, memberID string) error
- type RestClientOption
- type StatusDeployment
- type StatusReady
- type Subject
- type Team
- type TeamList
- type TeamMember
- type TeamsClient
- type User
- type UserClient
- type UserList
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClusterNotFound = errors.New("cluster not found")
View Source
var ErrTeamNotFound = errors.New("team not found")
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
func GetClusterMemberRoleValues ¶
func GetClusterMemberRoleValues() []string
GetClusterMemberRoleValues returns a slice of valid ClusterMemberRole values.
func GetMemberRoleValues ¶
func GetMemberRoleValues() []string
GetMemberRoleValues returns a slice of valid MemberRole values.
Types ¶
type AddClusterMemberRequest ¶
type AddClusterMemberRequest struct {
Subject AddClusterMemberSubject `json:"subject"`
Roles []ClusterMemberRole `json:"roles"`
}
type AddClusterMemberSubject ¶
type AddClusterMembersPayload ¶
type AddClusterMembersPayload struct {
Values []AddClusterMemberRequest `json:"values"`
}
type AddMemberSubject ¶
type AddTeamMemberRequest ¶
type AddTeamMemberRequest struct {
Roles []MemberRole `json:"roles"`
Subject AddMemberSubject `json:"subject"`
}
type Client ¶
type Client interface {
ClusterClient
IntegrationClient
MeClient
TeamsClient
UserClient
MemberClient
}
type Cluster ¶
type Cluster struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
ConsoleURL string `json:"consoleUrl"`
EPG string `json:"epg"`
IngressIP string `json:"ingressIp"`
NodePools NodePools `json:"nodePools"`
Status ClusterStatus `json:"status"`
Roles []string `json:"roles"`
}
type ClusterClient ¶
type ClusterClient interface {
ListClusters(ctx context.Context) (ClusterList, error)
GetCluster(ctx context.Context, name string) (*Cluster, error)
GetClusterStatus(ctx context.Context, clusterID string) (*Cluster, error)
CreateCluster(ctx context.Context, request NewClusterRequest) (*Cluster, error)
DeleteCluster(ctx context.Context, name string) error
GetClusterMembers(ctx context.Context, clusterID string) ([]ClusterMember, error)
AddClusterMember(ctx context.Context, clusterID string, request []AddClusterMemberRequest) error
RemoveClusterMember(ctx context.Context, clusterID string, memberID string) error
}
type ClusterList ¶
type ClusterList []Cluster
type ClusterMember ¶
type ClusterMember struct {
Subject ClusterMemberSubject `json:"subject" yaml:"subject"`
Roles []ClusterMemberRole `json:"roles" yaml:"roles"`
}
type ClusterMemberRole ¶
type ClusterMemberRole string
const ( ClusterMemberRoleAdmin ClusterMemberRole = "admin" ClusterMemberRoleReader ClusterMemberRole = "reader" )
func (ClusterMemberRole) IsValid ¶
func (r ClusterMemberRole) IsValid() bool
IsValid checks if the ClusterMemberRole is valid.
func (ClusterMemberRole) String ¶
func (r ClusterMemberRole) String() string
String returns the string representation of ClusterMemberRole.
type ClusterMemberSubject ¶
type ClusterStatus ¶
type ClusterStatus struct {
Ready StatusReady `json:"ready"`
Deployment StatusDeployment `json:"deployment"`
}
type ComputeResources ¶
type DeleteTeamRequest ¶
type DeleteTeamRequest struct {
TeamID string `json:"teamId"`
}
type IntegrationClient ¶
type IntegrationClient interface {
ListIntegrationInstances(ctx context.Context) ([]IntegrationInstance, error)
}
type IntegrationInstance ¶
type MemberClient ¶
type MemberRole ¶
type MemberRole string
const ( MemberRoleOwner MemberRole = "owner" MemberRoleMember MemberRole = "member" )
func (MemberRole) IsValid ¶
func (mr MemberRole) IsValid() bool
IsValid checks if the MemberRole is valid.
func (MemberRole) String ¶
func (mr MemberRole) String() string
String returns the string representation of MemberRole.
type NewClusterRequest ¶
type NewClusterRequest struct {
Name string `json:"name"`
SSOProvisioner string `json:"ssoProvisioner"`
NodePools NodePools `json:"nodepools,omitempty"`
Version string `json:"version,omitempty"`
Environment string `json:"environment,omitempty"`
PullSecretRef *string `json:"pullSecretRef,omitempty"`
}
type NewTeamRequest ¶
type NodePool ¶
type NodePool struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Preset string `json:"preset,omitempty"`
Replicas *int `json:"replicas,omitempty"`
Compute *ComputeResources `json:"compute,omitempty"`
AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"`
MinCount *int `json:"minCount,omitempty"`
MaxCount *int `json:"maxCount,omitempty"`
}
type RequestError ¶
type RequestError struct {
Message string
}
func (*RequestError) Error ¶
func (e *RequestError) Error() string
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(options ...RestClientOption) *RestClient
func (*RestClient) AddClusterMember ¶
func (c *RestClient) AddClusterMember(ctx context.Context, clusterID string, request []AddClusterMemberRequest) error
func (*RestClient) AddTeamMember ¶
func (c *RestClient) AddTeamMember(ctx context.Context, teamID string, request []AddTeamMemberRequest) error
func (*RestClient) CreateCluster ¶
func (c *RestClient) CreateCluster(ctx context.Context, request NewClusterRequest) (*Cluster, error)
func (*RestClient) CreateTeam ¶
func (c *RestClient) CreateTeam(ctx context.Context, request NewTeamRequest) (*Team, error)
func (*RestClient) DeleteCluster ¶
func (c *RestClient) DeleteCluster(ctx context.Context, id string) error
func (*RestClient) DeleteTeam ¶
func (c *RestClient) DeleteTeam(ctx context.Context, request DeleteTeamRequest) error
func (*RestClient) GetCluster ¶
func (*RestClient) GetClusterMembers ¶
func (c *RestClient) GetClusterMembers(ctx context.Context, clusterID string) ([]ClusterMember, error)
func (*RestClient) GetClusterStatus ¶
func (*RestClient) GetTeamMembers ¶
func (c *RestClient) GetTeamMembers(ctx context.Context, teamID string) ([]TeamMember, error)
func (*RestClient) ListClusters ¶
func (c *RestClient) ListClusters(ctx context.Context) (ClusterList, error)
func (*RestClient) ListIntegrationInstances ¶
func (c *RestClient) ListIntegrationInstances(ctx context.Context) ([]IntegrationInstance, error)
func (*RestClient) RemoveClusterMember ¶
func (*RestClient) RemoveTeamMember ¶
type RestClientOption ¶
type RestClientOption func(*RestClient)
func WithAuthenticator ¶
func WithAuthenticator(authenticator *authenticator.Authenticator) RestClientOption
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) RestClientOption
type StatusDeployment ¶
type StatusReady ¶
type TeamMember ¶
type TeamMember struct {
Subject Subject `json:"subject"`
Roles []MemberRole `json:"roles"`
}
type TeamsClient ¶
type TeamsClient interface {
ListTeams(ctx context.Context) ([]Team, error)
GetTeam(ctx context.Context, name string) (*Team, error)
GetTeamMembers(ctx context.Context, teamID string) ([]TeamMember, error)
CreateTeam(ctx context.Context, request NewTeamRequest) (*Team, error)
DeleteTeam(ctx context.Context, request DeleteTeamRequest) error
}
type UserClient ¶
Click to show internal directories.
Click to hide internal directories.