Documentation
¶
Index ¶
- type API
- func (api *API) Create(ctx context.Context, requester interface{}, request *CreateRequest) (*CreateResponse, error)
- func (api *API) Delete(ctx context.Context, requester interface{}, request *DeleteRequest) (*DeleteResponse, error)
- func (api *API) List(ctx context.Context, requester interface{}, request *ListRequest) (*ListResponse, error)
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type ListRequest
- type ListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) Create ¶
func (api *API) Create(ctx context.Context, requester interface{}, request *CreateRequest) (*CreateResponse, error)
func (*API) Delete ¶
func (api *API) Delete(ctx context.Context, requester interface{}, request *DeleteRequest) (*DeleteResponse, error)
func (*API) List ¶
func (api *API) List(ctx context.Context, requester interface{}, request *ListRequest) (*ListResponse, error)
type CreateRequest ¶
type CreateRequest struct {
Repo string `json:"repo"`
Branch string `json:"branch"`
Base string `json:"base,omitempty"`
}
func (*CreateRequest) Validate ¶
func (r *CreateRequest) Validate() error
type CreateResponse ¶
type DeleteRequest ¶
type DeleteRequest struct {
Repo string `json:"repo"`
Path string `json:"path"`
Force bool `json:"force,omitempty"`
}
func (*DeleteRequest) Validate ¶
func (r *DeleteRequest) Validate() error
type DeleteResponse ¶
type DeleteResponse struct {
Removed string `json:"removed"`
}
type ListRequest ¶
type ListRequest struct {
Repo string `json:"repo"`
// Fetch refreshes origin refs first, so remote branches are current.
Fetch bool `json:"fetch,omitempty"`
}
func (*ListRequest) Validate ¶
func (r *ListRequest) Validate() error
type ListResponse ¶
type ListResponse struct {
// Exists reports whether the path is a directory at all — the UI
// uses it to validate a project path before adding it.
Exists bool `json:"exists"`
IsGit bool `json:"is_git"`
Repo string `json:"repo,omitempty"`
Worktrees []worktree.Info `json:"worktrees"`
Branches []worktree.Branch `json:"branches,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.