api

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeDevice added in v1.4.0

func AuthorizeDevice(ctx context.Context) (*cliv1beta1.FinishLoginResponse, error)

func IsDepotError added in v1.3.0

func IsDepotError(err error) bool

IsDepotError returns true if the error is a DepotError

func NewBuildClient added in v1.4.0

func NewBuildClient() cliv1beta1connect.BuildServiceClient

func NewLoginClient added in v1.4.0

func NewLoginClient() cliv1beta1connect.LoginServiceClient

func NewProjectsClient added in v1.4.0

func NewProjectsClient() cliv1beta1connect.ProjectsServiceClient

func WithAuthentication added in v1.4.2

func WithAuthentication[T any](req *connect.Request[T], token string) *connect.Request[T]

func WithUserAgent added in v1.4.2

func WithUserAgent() connect.ClientOption

Types

type DepotError added in v1.3.0

type DepotError struct {
	Err error
}

DepotError wraps the error interface

func NewDepotError added in v1.3.0

func NewDepotError(err error) *DepotError

NewDepotError returns a new DepotError

func (*DepotError) Error added in v1.3.0

func (e *DepotError) Error() string

Error returns the error message

func (*DepotError) Unwrap added in v1.3.0

func (e *DepotError) Unwrap() error

Unwrap returns the underlying error

type ErrorResponse added in v0.0.7

type ErrorResponse struct {
	OK    bool   `json:"ok"`
	Error string `json:"error"`
}

type ReleaseResponse added in v0.0.9

type ReleaseResponse struct {
	OK          bool      `json:"ok"`
	Version     string    `json:"version"`
	URL         string    `json:"url"`
	PublishedAt time.Time `json:"publishedAt"`
}

func LatestRelease added in v1.4.0

func LatestRelease() (*ReleaseResponse, error)

Jump to

Keyboard shortcuts

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