Documentation
¶
Index ¶
- type Addition
- type BranchResp
- type CommitResp
- type ErrResp
- type Github
- func (d *Github) Config() driver.Config
- func (d *Github) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Github) Drop(ctx context.Context) error
- func (d *Github) GetAddition() driver.Additional
- func (d *Github) Init(ctx context.Context) error
- func (d *Github) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Github) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Github) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Github) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Github) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *Github) Remove(ctx context.Context, obj model.Obj) error
- func (d *Github) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- type Links
- type MessageTemplateVars
- type Object
- type PutBlobResp
- type RepoResp
- type TreeObjReq
- type TreeObjResp
- type TreeReq
- type TreeResp
- type UpdateRefReq
- type UserResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct {
driver.RootPath
Token string `json:"token" type:"string" required:"true"`
Owner string `json:"owner" type:"string" required:"true"`
Repo string `json:"repo" type:"string" required:"true"`
Ref string `json:"ref" type:"string" help:"A branch, a tag or a commit SHA, main branch by default."`
GitHubProxy string `` /* 151-byte string literal not displayed */
GPGPrivateKey string `json:"gpg_private_key" type:"text"`
GPGKeyPassphrase string `json:"gpg_key_passphrase" type:"string"`
CommitterName string `json:"committer_name" type:"string"`
CommitterEmail string `json:"committer_email" type:"string"`
AuthorName string `json:"author_name" type:"string"`
AuthorEmail string `json:"author_email" type:"string"`
MkdirCommitMsg string `json:"mkdir_commit_message" type:"text" default:"{{.UserName}} mkdir {{.ObjPath}}"`
DeleteCommitMsg string `json:"delete_commit_message" type:"text" default:"{{.UserName}} remove {{.ObjPath}}"`
PutCommitMsg string `json:"put_commit_message" type:"text" default:"{{.UserName}} upload {{.ObjPath}}"`
RenameCommitMsg string `json:"rename_commit_message" type:"text" default:"{{.UserName}} rename {{.ObjPath}} to {{.TargetName}}"`
CopyCommitMsg string `json:"copy_commit_message" type:"text" default:"{{.UserName}} copy {{.ObjPath}} to {{.TargetPath}}"`
MoveCommitMsg string `json:"move_commit_message" type:"text" default:"{{.UserName}} move {{.ObjPath}} to {{.TargetPath}}"`
}
type BranchResp ¶
type BranchResp struct {
Name string `json:"name"`
Commit CommitResp `json:"commit"`
}
type CommitResp ¶
type CommitResp struct {
Sha string `json:"sha"`
}
type Github ¶
func (*Github) GetAddition ¶
func (d *Github) GetAddition() driver.Additional
type MessageTemplateVars ¶
type Object ¶
type Object struct {
Type string `json:"type"`
Encoding string `json:"encoding" required:"false"`
Size int64 `json:"size"`
Name string `json:"name"`
Path string `json:"path"`
Content string `json:"Content" required:"false"`
Sha string `json:"sha"`
URL string `json:"url"`
GitURL string `json:"git_url"`
HtmlURL string `json:"html_url"`
DownloadURL string `json:"download_url"`
Entries []Object `json:"entries" required:"false"`
Links Links `json:"_links"`
SubmoduleGitURL string `json:"submodule_git_url" required:"false"`
Target string `json:"target" required:"false"`
}
type PutBlobResp ¶
type TreeObjReq ¶
type TreeObjResp ¶
type TreeObjResp struct {
TreeObjReq
Size int64 `json:"size" required:"false"`
URL string `json:"url"`
}
type TreeReq ¶
type TreeReq struct {
BaseTree interface{} `json:"base_tree,omitempty"`
Trees []interface{} `json:"tree"`
}
type TreeResp ¶
type TreeResp struct {
Sha string `json:"sha"`
URL string `json:"url"`
Trees []TreeObjResp `json:"tree"`
Truncated bool `json:"truncated"`
}
type UpdateRefReq ¶
Click to show internal directories.
Click to hide internal directories.