api

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIAuthenticationResponse

type CLIAuthenticationResponse struct {
	RequestID  string `json:"requestID"`
	ExpiresIn  int    `json:"expiresIn"`
	Interval   int    `json:"interval"`
	ApproveURL string `json:"approveURL"`
	TokenURL   string `json:"tokenURL"`
}

type Depot

type Depot struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewDepot

func NewDepot(baseURL string, token string) *Depot

func NewDepotFromEnv

func NewDepotFromEnv(token string) (*Depot, error)

func (*Depot) AuthorizeDevice

func (d *Depot) AuthorizeDevice() (*TokenResponse, error)

func (*Depot) FinishBuild

func (d *Depot) FinishBuild(buildID string) error

func (*Depot) GetProjects added in v0.0.10

func (d *Depot) GetProjects() (*GetProjectsResponse, error)

func (*Depot) InitBuild

func (d *Depot) InitBuild(projectID string) (*InitResponse, error)

func (*Depot) LatestRelease added in v0.0.9

func (d *Depot) LatestRelease() (*ReleaseResponse, error)

type ErrorResponse added in v0.0.7

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

type FinishResponse added in v0.0.8

type FinishResponse struct {
	OK bool `json:"ok"`
}

type GetProjectsResponse added in v0.0.10

type GetProjectsResponse struct {
	OK       bool       `json:"ok"`
	Projects []*Project `json:"projects"`
}

type InitResponse

type InitResponse struct {
	OK          bool   `json:"ok"`
	BaseURL     string `json:"baseURL"`
	ID          string `json:"id"`
	AccessToken string `json:"accessToken"`
	Busy        bool   `json:"busy"`
}

type Project added in v0.0.10

type Project struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	OrgID   string `json:"orgID"`
	OrgName string `json:"orgName"`
}

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"`
}

type TokenRequest

type TokenRequest struct {
	RequestID string `json:"requestID"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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