Documentation
¶
Index ¶
- Variables
- func GetClusterMemberRoleValues() []string
- func GetMemberRoleValues() []string
- type AIAPIKey
- type AIAPIKeyClient
- type AIAPIKeyWithSecret
- type AIClient
- type AIDeployment
- type AIDeploymentCreatedBy
- type AIModel
- 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 EditPullSecretRequest
- type ImagePullSecret
- type IntegrationClient
- type IntegrationInstance
- type Me
- type MeClient
- type MemberClient
- type MemberRole
- type NewAIAPIKeyRequest
- type NewAIDeploymentRequest
- type NewClusterRequest
- type NewPullSecretRequest
- type NewTeamRequest
- type NodePool
- type NodePools
- type PullSecret
- type PullSecretClient
- type PullSecretCredential
- 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) CreateAIAPIKey(ctx context.Context, deploymentID string, request NewAIAPIKeyRequest) (*AIAPIKeyWithSecret, error)
- func (c *RestClient) CreateAIDeployment(ctx context.Context, request NewAIDeploymentRequest) (*AIDeployment, error)
- func (c *RestClient) CreateCluster(ctx context.Context, request NewClusterRequest) (*Cluster, error)
- func (c *RestClient) CreatePullSecret(ctx context.Context, request NewPullSecretRequest) (*PullSecret, error)
- func (c *RestClient) CreateTeam(ctx context.Context, request NewTeamRequest) (*Team, error)
- func (c *RestClient) DeleteAIAPIKey(ctx context.Context, deploymentID string, keyID string) error
- func (c *RestClient) DeleteAIDeployment(ctx context.Context, id string) error
- func (c *RestClient) DeleteCluster(ctx context.Context, id string) error
- func (c *RestClient) DeletePullSecret(ctx context.Context, id string) error
- func (c *RestClient) DeleteTeam(ctx context.Context, request DeleteTeamRequest) error
- func (c *RestClient) EditPullSecret(ctx context.Context, id string, request EditPullSecretRequest) (*PullSecret, error)
- func (c *RestClient) GetAIAPIKey(ctx context.Context, deploymentID string, name string) (*AIAPIKey, error)
- func (c *RestClient) GetAIDeployment(ctx context.Context, name string) (*AIDeployment, 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) GetPullSecret(ctx context.Context, id string) (*PullSecret, 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) ListAIAPIKeys(ctx context.Context, deploymentID string) ([]AIAPIKey, error)
- func (c *RestClient) ListAIDeployments(ctx context.Context) ([]AIDeployment, error)
- func (c *RestClient) ListAIModels(ctx context.Context) ([]AIModel, error)
- func (c *RestClient) ListClusters(ctx context.Context) (ClusterList, error)
- func (c *RestClient) ListIntegrationInstances(ctx context.Context) ([]IntegrationInstance, error)
- func (c *RestClient) ListPullSecrets(ctx context.Context) ([]PullSecret, 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
- func (c *RestClient) SetClusterPullSecret(ctx context.Context, clusterID string, pullSecretID 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 AIAPIKey ¶ added in v1.2.0
type AIAPIKey struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Prefix string `json:"prefix" yaml:"prefix"`
CreatedBy AIDeploymentCreatedBy `json:"createdBy" yaml:"createdBy"`
CreatedAt string `json:"createdAt" yaml:"createdAt"`
ExpiresAt string `json:"expiresAt" yaml:"expiresAt"`
}
type AIAPIKeyClient ¶ added in v1.2.0
type AIAPIKeyClient interface {
ListAIAPIKeys(ctx context.Context, deploymentID string) ([]AIAPIKey, error)
GetAIAPIKey(ctx context.Context, deploymentID string, name string) (*AIAPIKey, error)
CreateAIAPIKey(ctx context.Context, deploymentID string, request NewAIAPIKeyRequest) (*AIAPIKeyWithSecret, error)
DeleteAIAPIKey(ctx context.Context, deploymentID string, keyID string) error
}
type AIAPIKeyWithSecret ¶ added in v1.2.0
type AIClient ¶ added in v1.2.0
type AIClient interface {
ListAIModels(ctx context.Context) ([]AIModel, error)
ListAIDeployments(ctx context.Context) ([]AIDeployment, error)
GetAIDeployment(ctx context.Context, name string) (*AIDeployment, error)
CreateAIDeployment(ctx context.Context, request NewAIDeploymentRequest) (*AIDeployment, error)
DeleteAIDeployment(ctx context.Context, id string) error
}
type AIDeployment ¶ added in v1.2.0
type AIDeployment struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Model string `json:"model" yaml:"model"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
CreatedBy AIDeploymentCreatedBy `json:"createdBy" yaml:"createdBy"`
}
type AIDeploymentCreatedBy ¶ added in v1.2.0
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
AIClient
AIAPIKeyClient
PullSecretClient
}
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"`
ImagePullSecret *ImagePullSecret `json:"imagePullSecret"`
}
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 EditPullSecretRequest ¶ added in v1.4.0
type EditPullSecretRequest struct {
Registries map[string]*PullSecretCredential `json:"registries"`
}
type ImagePullSecret ¶ added in v1.4.0
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 NewAIAPIKeyRequest ¶ added in v1.2.0
type NewAIDeploymentRequest ¶ added in v1.2.0
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 NewPullSecretRequest ¶ added in v1.4.0
type NewPullSecretRequest struct {
Name string `json:"name"`
Registries map[string]PullSecretCredential `json:"registries"`
}
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 PullSecret ¶ added in v1.4.0
type PullSecretClient ¶ added in v1.4.0
type PullSecretClient interface {
ListPullSecrets(ctx context.Context) ([]PullSecret, error)
GetPullSecret(ctx context.Context, id string) (*PullSecret, error)
CreatePullSecret(ctx context.Context, request NewPullSecretRequest) (*PullSecret, error)
EditPullSecret(ctx context.Context, id string, request EditPullSecretRequest) (*PullSecret, error)
DeletePullSecret(ctx context.Context, id string) error
SetClusterPullSecret(ctx context.Context, clusterID string, pullSecretID string) error
}
type PullSecretCredential ¶ added in v1.4.0
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) CreateAIAPIKey ¶ added in v1.2.0
func (c *RestClient) CreateAIAPIKey( ctx context.Context, deploymentID string, request NewAIAPIKeyRequest, ) (*AIAPIKeyWithSecret, error)
func (*RestClient) CreateAIDeployment ¶ added in v1.2.0
func (c *RestClient) CreateAIDeployment(ctx context.Context, request NewAIDeploymentRequest) (*AIDeployment, error)
func (*RestClient) CreateCluster ¶
func (c *RestClient) CreateCluster(ctx context.Context, request NewClusterRequest) (*Cluster, error)
func (*RestClient) CreatePullSecret ¶ added in v1.4.0
func (c *RestClient) CreatePullSecret(ctx context.Context, request NewPullSecretRequest) (*PullSecret, error)
func (*RestClient) CreateTeam ¶
func (c *RestClient) CreateTeam(ctx context.Context, request NewTeamRequest) (*Team, error)
func (*RestClient) DeleteAIAPIKey ¶ added in v1.2.0
func (*RestClient) DeleteAIDeployment ¶ added in v1.2.0
func (c *RestClient) DeleteAIDeployment(ctx context.Context, id string) error
func (*RestClient) DeleteCluster ¶
func (c *RestClient) DeleteCluster(ctx context.Context, id string) error
func (*RestClient) DeletePullSecret ¶ added in v1.4.0
func (c *RestClient) DeletePullSecret(ctx context.Context, id string) error
func (*RestClient) DeleteTeam ¶
func (c *RestClient) DeleteTeam(ctx context.Context, request DeleteTeamRequest) error
func (*RestClient) EditPullSecret ¶ added in v1.4.0
func (c *RestClient) EditPullSecret( ctx context.Context, id string, request EditPullSecretRequest, ) (*PullSecret, error)
func (*RestClient) GetAIAPIKey ¶ added in v1.2.0
func (*RestClient) GetAIDeployment ¶ added in v1.2.0
func (c *RestClient) GetAIDeployment(ctx context.Context, name string) (*AIDeployment, error)
func (*RestClient) GetCluster ¶
func (*RestClient) GetClusterMembers ¶
func (c *RestClient) GetClusterMembers(ctx context.Context, clusterID string) ([]ClusterMember, error)
func (*RestClient) GetClusterStatus ¶
func (*RestClient) GetPullSecret ¶ added in v1.4.0
func (c *RestClient) GetPullSecret(ctx context.Context, id string) (*PullSecret, error)
func (*RestClient) GetTeamMembers ¶
func (c *RestClient) GetTeamMembers(ctx context.Context, teamID string) ([]TeamMember, error)
func (*RestClient) ListAIAPIKeys ¶ added in v1.2.0
func (*RestClient) ListAIDeployments ¶ added in v1.2.0
func (c *RestClient) ListAIDeployments(ctx context.Context) ([]AIDeployment, error)
func (*RestClient) ListAIModels ¶ added in v1.2.0
func (c *RestClient) ListAIModels(ctx context.Context) ([]AIModel, 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) ListPullSecrets ¶ added in v1.4.0
func (c *RestClient) ListPullSecrets(ctx context.Context) ([]PullSecret, error)
func (*RestClient) RemoveClusterMember ¶
func (*RestClient) RemoveTeamMember ¶
func (*RestClient) SetClusterPullSecret ¶ added in v1.4.0
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.