api_client

package
v0.0.0-...-5d4f8f2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestCallLimit int = 4

	AuthUriPath        = "auth"
	RepoUriPath        = "repo"
	ModelUriPath       = "model"
	OutUriPath         = "out"
	RepoAttrsUriPath   = "repo_attrs"
	DatasetUriPath     = "dataset"
	BranchAttrsUriPath = "branch_attr"
	CommitUriPath      = "commit"
	CommitAttrsUriPath = "commit_attrs"
	CommitMapUriPath   = "commit_map"
	FileUriPath        = "file"
	FileAttrsUriPath   = "file_attrs"
	ObjectUriPath      = "object"
	VfsUriPath         = "vfs"
	WorkerUriPath      = "worker"
	FlowUriPath        = "flow"
	FlowAttrsUriPath   = "flow_attrs"
	TaskAttrsUriPath   = "tasks"
	TaskStatusUriPath  = "task_status"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

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

func NewApiClient

func NewApiClient(addr *url.URL, c *config.UrlMap, jwt string) (*ApiClient, error)

func (*ApiClient) BasicAuth

func (c *ApiClient) BasicAuth(name, password string) (jwt string, userAttrs *auth_server.UserAttrs, fnError error)

func (*ApiClient) GetCommit

func (c *ApiClient) GetCommit(repoName, branchName, commitId string) (*ws.Commit, error)

func (*ApiClient) GetCommitMap

func (c *ApiClient) GetCommitMap(repoName, commitId string) (*ws.FileMap, error)

func (*ApiClient) GetFileObject

func (c *ApiClient) GetFileObject(repoName, branchName, commitId, filePath string) (string, io.ReadCloser, error)

func (*ApiClient) GetFlowAttrs

func (c *ApiClient) GetFlowAttrs(flowId string) (*flow_pkg.FlowAttrs, error)

func (*ApiClient) GetFlowStatus

func (c *ApiClient) GetFlowStatus(flowId string) (string, error)

func (*ApiClient) GetModelByFlowId

func (c *ApiClient) GetModelByFlowId(flowId string) (*ws.Repo, *ws.Branch, *ws.Commit, error)

func (*ApiClient) GetOrCreateCommit

func (c *ApiClient) GetOrCreateCommit(repoName, branchName, commitId string) (*ws.Commit, error)

func (*ApiClient) GetOutputRepo

func (c *ApiClient) GetOutputRepo(flowId string) (*ws.Repo, *ws.Branch, *ws.Commit, error)

func (*ApiClient) InitBranch

func (c *ApiClient) InitBranch(repoName string, branchName string, headId string) error

func (*ApiClient) InitDataRepo

func (c *ApiClient) InitDataRepo(dir string, repoName string) error

func (*ApiClient) InitModelRepo

func (c *ApiClient) InitModelRepo(dir, repoName string) error

func (*ApiClient) InitOutRepo

func (c *ApiClient) InitOutRepo(dir, repoName string) error

func (*ApiClient) InitRepo

func (c *ApiClient) InitRepo(repoName string) error

func (*ApiClient) PutObjectWriter

func (c *ApiClient) PutObjectWriter(repoName string, branchName string, commitId string, fpath string) (io.WriteCloser, error)

func (*ApiClient) RequestLog

func (c *ApiClient) RequestLog(flowId string) ([]byte, error)

func (*ApiClient) RunTask

func (c *ApiClient) RunTask(rname, bname, headCommitId, cmdStr string, envVars map[string]string) (newFlow *flow_pkg.Flow, newCommit *ws.Commit, fnError error)

Jump to

Keyboard shortcuts

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