repo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESP_SUCCESS                     string = "SUCCESS"
	RESP_DECODE_SPEC_FAILED          string = "DECODE_SPEC_FAILED"
	RESP_REPO_CONNECTION_ERR         string = "REPO_CONNECTION_ERR"
	RESP_PREFAB_NO_MATCH             string = "PREFAB_NO_MATCH"
	RESP_PREFAB_SERVICE_INTERNAL_ERR string = "PREFAB_SERVICE_INTERNAL_ERR"
)

Variables

Functions

func RepoServerRun

func RepoServerRun(servicePort string, prefabHubAddress string, workDir string) (err error)

servicePort format: `:PORT` prefabAddress format: `http[s]://username:password@hostname/path`

func SendResponse

func SendResponse(conn net.Conn, status string, body ...string) (err error)

Types

type LocalPrefabService

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

func NewLocalPrefabService

func NewLocalPrefabService(workDir string, tmpDir string, serverEndpoint string) (ps *LocalPrefabService, err error)

func (*LocalPrefabService) RepoRequest

func (ps *LocalPrefabService) RepoRequest(spec repointerface.SpecSheet) (body []string, err error)

func (*LocalPrefabService) RequestBlueprint

func (ps *LocalPrefabService) RequestBlueprint(prefab *prefablib.Prefab, ctx *dcontext.DeployContext) (blueprint prefablib.Blueprint, err error)

func (*LocalPrefabService) RequestPrefab

func (ps *LocalPrefabService) RequestPrefab(prefab *prefablib.Prefab, ctx *dcontext.DeployContext) (prefabPath string, blueprint prefablib.Blueprint, err error)

func (*LocalPrefabService) WaitDownload

func (ps *LocalPrefabService) WaitDownload() error

type Response

type Response struct {
	Status string   `json:"status"`
	Body   []string `json:"body"`
}

func NewResponse

func NewResponse(status string, body ...string) (r Response)

func NewResponseSafe

func NewResponseSafe(status string, body ...string) (r Response, err error)

func UnmarshalResponse

func UnmarshalResponse(data []byte) (*Response, error)

func (*Response) IsError

func (r *Response) IsError() bool

func (*Response) IsSuccess

func (r *Response) IsSuccess() bool

func (*Response) Marshal

func (r *Response) Marshal() ([]byte, error)

func (*Response) NoMatch

func (r *Response) NoMatch() bool

func (*Response) Send

func (r *Response) Send(conn net.Conn) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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