requests

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Graphql = graphql.NewClient("https://api.let.sh.cn/query")

create a client (safe to share across requests)

Functions

func CancelDeployment added in v0.0.28

func CancelDeployment(deploymentID string) (
	cancelDeploymentResult bool, err error)

func CheckDeployCapability

func CheckDeployCapability(projectName string) (hashID string, exists bool, err error)

func Deploy

func Deploy(projectType, projectName, config string, cn bool) (deployment struct {
	ID           string `json:"id"`
	TargetFQDN   string `json:"targetFQDN"`
	NetworkStage string `json:"networkStage"`
	PackerStage  string `json:"packerStage"`
	Status       string `json:"status"`
	Project      struct {
		ID string `json:"id"`
	} `json:"project"`
}, err error)

func GetDeploymentStatus

func GetDeploymentStatus(id string) (deployment struct {
	TargetFQDN   string `json:"targetFQDN"`
	NetworkStage string `json:"networkStage"`
	PackerStage  string `json:"packerStage"`
	Status       string `json:"status"`
	Done         bool   `json:"done"`
	ErrorMessage string `json:"errorMessage"`
}, err error)

func GetJsonWithPath

func GetJsonWithPath(url string, path string) (data gjson.Result, err error)

func GetLatestVersion added in v0.0.47

func GetLatestVersion(channel string) (version string, err error)

func GetStsToken

func GetStsToken(uploadType, projectName string) (data struct {
	Host            string `json:"host"`
	AccessKeyID     string `json:"accessKeyID"`
	AccessKeySecret string `json:"accessKeySecret"`
	SecurityToken   string `json:"securityToken"`
}, err error)

func GetTemplate added in v0.0.26

func GetTemplate(typeArg string) (
	buildTemplate struct {
		ContainsStatic   bool     `json:"containsStatic"`
		ContainsDynamic  bool     `json:"containsDynamic"`
		RequireCompiling bool     `json:"requireCompiling"`
		LocalCompiling   bool     `json:"localCompiling"`
		CompileCommands  []string `json:"compileCommands"`
		DistDir          string   `json:"distDir"`
	}, err error)

func QueryDeployments added in v0.0.34

func QueryDeployments(projectName string, count int) (
	deployments struct {
		Edges []struct {
			Node struct {
				ID string `json:"id"`
			} `json:"node"`
		} `json:"edges"`
	}, err error)

func StartDevelopment added in v0.0.52

func StartDevelopment(projectID string) (
	startDevelopmentResult struct {
		RemotePort    int    `json:"remotePort,omitempty"`
		RemoteAddress string `json:"remoteAddress,omitempty"`
		Fqdn          string `json:"fqdn,omitempty"`
	}, err error)

func StopDevelopment added in v0.0.52

func StopDevelopment(projectID string) (
	stopDevelopmentResult bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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