Documentation ¶
Overview ¶
Package client implements the PipyRepo struct.
Index ¶
- type Batch
- type BatchItem
- type Codebase
- type PipyRepoClient
- func NewRepoClient(serverAddr string, serverPort uint16) *PipyRepoClient
- func NewRepoClientWithAPIBaseURLAndTransport(serverAddr string, serverPort uint16, transport *http.Transport) *PipyRepoClient
- func NewRepoClientWithTransport(serverAddr string, serverPort uint16, transport *http.Transport) *PipyRepoClient
- func (p *PipyRepoClient) Batch(version string, batches []Batch) (success bool, err error)
- func (p *PipyRepoClient) CodebaseExists(path string) bool
- func (p *PipyRepoClient) Delete(codebaseName string) (success bool, err error)
- func (p *PipyRepoClient) DeriveCodebase(codebaseName, base string, version uint64) (success bool, err error)
- func (p *PipyRepoClient) GetCodebase(codebaseName string) (success bool, codebase *Codebase, err error)
- func (p *PipyRepoClient) GetFile(path string) (string, error)
- func (p *PipyRepoClient) IsRepoUp() (success bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codebase ¶
type Codebase struct { Version string `json:"version,omitempty"` Path string `json:"path,omitempty"` Main string `json:"main,omitempty"` Base string `json:"base,omitempty"` Files []string `json:"files,omitempty"` EditFiles []string `json:"editFiles,omitempty"` ErasedFiles []string `json:"erasedFiles,omitempty"` Derived []string `json:"derived,omitempty"` }
Codebase is Pipy's logic unit
type PipyRepoClient ¶
type PipyRepoClient struct { Restore func() error // contains filtered or unexported fields }
PipyRepoClient Pipy Repo Client
func NewRepoClient ¶
func NewRepoClient(serverAddr string, serverPort uint16) *PipyRepoClient
NewRepoClient creates a Repo Client
func NewRepoClientWithAPIBaseURLAndTransport ¶
func NewRepoClientWithAPIBaseURLAndTransport(serverAddr string, serverPort uint16, transport *http.Transport) *PipyRepoClient
NewRepoClientWithAPIBaseURLAndTransport creates a Repo Client with ApiBaseUrl and Transport
func NewRepoClientWithTransport ¶
func NewRepoClientWithTransport(serverAddr string, serverPort uint16, transport *http.Transport) *PipyRepoClient
NewRepoClientWithTransport creates a Repo Client with Transport
func (*PipyRepoClient) Batch ¶
func (p *PipyRepoClient) Batch(version string, batches []Batch) (success bool, err error)
Batch submits multiple resources at once
func (*PipyRepoClient) CodebaseExists ¶ added in v1.1.0
func (p *PipyRepoClient) CodebaseExists(path string) bool
CodebaseExists checks whether the codebase exists
func (*PipyRepoClient) Delete ¶
func (p *PipyRepoClient) Delete(codebaseName string) (success bool, err error)
Delete codebase
func (*PipyRepoClient) DeriveCodebase ¶
func (p *PipyRepoClient) DeriveCodebase(codebaseName, base string, version uint64) (success bool, err error)
DeriveCodebase derives Codebase
func (*PipyRepoClient) GetCodebase ¶
func (p *PipyRepoClient) GetCodebase(codebaseName string) (success bool, codebase *Codebase, err error)
GetCodebase retrieves Codebase
func (*PipyRepoClient) GetFile ¶ added in v1.1.0
func (p *PipyRepoClient) GetFile(path string) (string, error)
GetFile gets the file content from repo
func (*PipyRepoClient) IsRepoUp ¶
func (p *PipyRepoClient) IsRepoUp() (success bool, err error)
IsRepoUp checks whether the repo is up
Click to show internal directories.
Click to hide internal directories.