client

package
v0.1.40 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountService

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

func (*AccountService) AccountGet

func (a *AccountService) AccountGet(ctx context.Context, userID string) (types.Account, error)

func (*AccountService) PairingTokenCreate

func (a *AccountService) PairingTokenCreate(ctx context.Context) (code string, err error)

func (*AccountService) PairingTokenExchange

func (a *AccountService) PairingTokenExchange(ctx context.Context, code string) (token string, account *types.Account, err error)

func (*AccountService) ProjectGet

func (a *AccountService) ProjectGet(ctx context.Context, owner, name string) (types.Project, error)

type BuildService added in v0.1.8

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

func (*BuildService) Create added in v0.1.8

func (b *BuildService) Create(ctx context.Context, owner, project string, params types.BuildsCreateParams) (string, error)

type Client

type Client struct {
	Build     *BuildService
	Provider  Provider
	Exec      Execer
	SSHKey    *SSHKeyService
	Volume    *VolumeService
	Endpoints *EndpointService
	Evals     *EvalService

	// Management
	Account *AccountService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg Config) *Client

func (*Client) ExecuteRest

func (c *Client) ExecuteRest(ctx context.Context, req *RestRequest, resp interface{}) error

func (*Client) NewAuthorizedRestRequest

func (c *Client) NewAuthorizedRestRequest(rtype RestRequestType, endpoint string, query map[string]string, body interface{}) (
	*RestRequest, error,
)

func (*Client) NewRestRequest

func (c *Client) NewRestRequest(rtype RestRequestType, endpoint string, params map[string]string, body interface{}) (
	*RestRequest, error,
)

type Config

type Config struct {
	ApiURL string `json:"apiURL"`
	Token  string `json:"token"`
}

type EndpointService added in v0.1.40

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

func (*EndpointService) Create added in v0.1.40

func (s *EndpointService) Create(ctx context.Context, userID, projectID, execID, name string) (types.Endpoint, error)

func (*EndpointService) CreateVersion added in v0.1.40

func (s *EndpointService) CreateVersion(ctx context.Context, userID, projectID, endpointID, execID string) (types.EndpointVersion, error)

func (*EndpointService) EndpointCheckStatus added in v0.1.40

func (s *EndpointService) EndpointCheckStatus(ctx context.Context, userID, projectID, checkID string) (types.EndpointCheck, error)

func (*EndpointService) EvalAttach added in v0.1.40

func (s *EndpointService) EvalAttach(ctx context.Context, userID, projectID, endpointID, evalID string) error

func (*EndpointService) List added in v0.1.40

func (s *EndpointService) List(ctx context.Context, userID, projectID string) ([]types.EndpointListItem, error)

func (*EndpointService) RunEvalCheck added in v0.1.40

func (s *EndpointService) RunEvalCheck(ctx context.Context, userID, projectID, endpointID string) error

type EvalService added in v0.1.40

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

func (*EvalService) Create added in v0.1.40

func (s *EvalService) Create(ctx context.Context, userID, projectID, execID string) (types.Eval, error)

func (*EvalService) List added in v0.1.40

func (s *EvalService) List(ctx context.Context, userID, projectID string) ([]types.Eval, error)

type ExecService added in v0.1.16

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

func (*ExecService) Create added in v0.1.16

func (s *ExecService) Create(ctx context.Context, owner, project string, params types.ExecCreateParams) (*types.Exec, error)

func (*ExecService) Exec added in v0.1.16

func (s *ExecService) Exec(ctx context.Context, cmd []string, image string, sessionID *string) (*types.Exec, error)

func (*ExecService) Get added in v0.1.16

func (s *ExecService) Get(ctx context.Context, owner, project, sessionID string) (*types.Exec, error)

func (*ExecService) List added in v0.1.16

func (s *ExecService) List(ctx context.Context, owner, project string, listTerminated bool) ([]types.Exec, error)

func (*ExecService) Terminate added in v0.1.16

func (s *ExecService) Terminate(ctx context.Context, owner, project, sessionID string) error

type Execer added in v0.1.40

type Execer interface {
	Create(ctx context.Context, owner, project string, params types.ExecCreateParams) (*types.Exec, error)
	Exec(ctx context.Context, cmd []string, image string, sessionID *string) (*types.Exec, error)
	List(ctx context.Context, owner, project string, listTerminated bool) ([]types.Exec, error)
	Get(ctx context.Context, owner, project, sessionID string) (*types.Exec, error)
	Terminate(ctx context.Context, owner, project, sessionID string) error
}

type Provider added in v0.1.40

type Provider interface {
	ListNodeTypes(ctx context.Context, provider types.Provider, filterAvailable bool) ([]types.NodeType, error)
}

type ProviderService

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

func (*ProviderService) ListNodeTypes

func (p *ProviderService) ListNodeTypes(ctx context.Context, provider types.Provider, filterAvailable bool) ([]types.NodeType, error)

type RestRequest

type RestRequest struct {
	Url    string
	Header http.Header
	Body   io.Reader
	Type   RestRequestType
}

type SSHKeyService

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

func (*SSHKeyService) Add

func (s *SSHKeyService) Add(ctx context.Context, owner string, params types.SSHKeyAddParams) (string, error)

func (*SSHKeyService) Generate

func (*SSHKeyService) List

func (s *SSHKeyService) List(ctx context.Context, owner string) ([]types.SSHKey, error)

type VolumeService added in v0.1.36

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

func (*VolumeService) Create added in v0.1.36

func (s *VolumeService) Create(ctx context.Context, userID, projectID string, create types.VolumeCreateRequest) (types.Volume, error)

func (*VolumeService) Delete added in v0.1.36

func (s *VolumeService) Delete(ctx context.Context, userID, projectID, volumeIDOrName string) error

func (*VolumeService) List added in v0.1.36

func (s *VolumeService) List(ctx context.Context, userID string, projectID string) ([]types.Volume, error)

func (*VolumeService) Update added in v0.1.36

func (s *VolumeService) Update(ctx context.Context, userID, projectID, volumeIDOrName string, update types.VolumeResizeRequest) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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