project

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package project resolves and persists the currently selected Volcano project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find added in v0.31.0

func Find(ctx context.Context, client *api.Client, identifier string) (*apiclient.Project, error)

Find scans every project the credential can see for an exact ID or name match. Only an account token can list projects, so callers establish that before calling; a project access token earns a 403 here.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service performs authenticated Volcano project workflows.

func NewService

func NewService(deps cliruntime.Deps) Service

NewService returns a project service.

func (Service) Create

func (s Service) Create(ctx context.Context, name string) (*apiclient.Project, error)

Create creates a project for the authenticated user.

func (Service) Delete

func (s Service) Delete(ctx context.Context, projectID string) error

Delete starts asynchronous project deletion by ID.

func (Service) Get

func (s Service) Get(ctx context.Context, projectID string) (*apiclient.Project, error)

Get returns one authenticated project by ID.

func (Service) List

func (s Service) List(ctx context.Context, page, limit int) (*config.Config, *apiclient.PaginatedProjects, error)

List returns the authenticated config and one visible project page.

func (Service) ListAnonKeys added in v0.5.0

func (s Service) ListAnonKeys(ctx context.Context, projectID string) ([]apiclient.AnonKey, error)

ListAnonKeys returns a project's anon keys (the publishable frontend/SDK keys). projectID may be empty to use the currently selected project.

func (Service) Rename added in v0.25.0

func (s Service) Rename(ctx context.Context, projectID, name string) (*apiclient.Project, error)

Rename changes a project's name and refreshes the saved active project.

func (Service) RequireAccountToken added in v0.31.0

func (s Service) RequireAccountToken() error

RequireAccountToken reports whether the configured credential can run the account-scoped project commands. Renaming and deleting a project are pk-only server-side, and a destructive command has to refuse before it asks the user to confirm something the CLI already knows cannot happen.

func (Service) Use

func (s Service) Use(ctx context.Context, identifier string) (*apiclient.Project, error)

Use sets the active project by exact ID or exact name.

Jump to

Keyboard shortcuts

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