Documentation
¶
Index ¶
- Variables
- func CreateCluster(ctx context.Context, tx bun.IDB, cluster *models.Cluster) error
- func CreateOperatorBootstrap(ctx context.Context, db bun.Tx, bootstrap *models.ClusterOperatorBootstrap) error
- func CreateProjectCluster(ctx context.Context, db bun.IDB, pc *models.ProjectCluster) error
- func CreateToken(ctx context.Context, db bun.IDB, token *models.ClusterToken) error
- func DeleteCluster(ctx context.Context, db bun.IDB, c *models.Cluster) error
- func DeleteProjectsForCluster(ctx context.Context, db bun.IDB, clusterID uuid.UUID) error
- func GetCluster(ctx context.Context, db bun.IDB, cluster *models.Cluster) (*models.Cluster, error)
- func GetClusterForToken(ctx context.Context, db bun.IDB, token string) (cluster *models.Cluster, err error)
- func GetOperatorBootstrap(ctx context.Context, db bun.IDB, clusterid string) (*models.ClusterOperatorBootstrap, error)
- func GetProjectsForCluster(ctx context.Context, db bun.IDB, clusterID uuid.UUID) ([]models.ProjectCluster, error)
- func ListClusters(ctx context.Context, db bun.IDB, qo commonv3.QueryOptions) (clusters []models.Cluster, err error)
- func Notify(db *bun.DB, chanName string, value string) error
- func RegisterToken(ctx context.Context, db bun.IDB, token string) (*models.ClusterToken, error)
- func UpdateCluster(ctx context.Context, db bun.IDB, c *models.Cluster) error
- func UpdateClusterAnnotations(ctx context.Context, db bun.IDB, c *models.Cluster) error
- func ValidateClusterAccess(ctx context.Context, db bun.IDB, opts commonv3.QueryOptions) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidToken is returned when token is invalid ErrInvalidToken = errors.New("invalid token") // ErrUsedToken is returned when token has been registered ErrUsedToken = errors.New("used token") )
Functions ¶
func CreateCluster ¶
func CreateOperatorBootstrap ¶
func CreateProjectCluster ¶
func CreateToken ¶
CreateToken creates a token for given cluster name
func GetCluster ¶
func GetClusterForToken ¶
func GetOperatorBootstrap ¶
func GetProjectsForCluster ¶
func ListClusters ¶
func RegisterToken ¶
registerToken registers the cluster token
func ValidateClusterAccess ¶
func ValidateClusterAccess(ctx context.Context, db bun.IDB, opts commonv3.QueryOptions) (bool, error)
Check if the project in scope is owner of the cluster
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.