Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateConfig = &request.Config{
Action: "POST",
Resource: "projects/:project_id/repository/branches",
}
View Source
var DeleteConfig = &request.Config{ Action: "DELETE", Resource: "projects/:project_id/repository/branches/:branch_name", Headers: map[string]string{ "Content-Type": "application/json", }, }
View Source
var GetConfig = &request.Config{ Action: "GET", Resource: "projects/:project_id/repository/branches/:branch_name", Headers: map[string]string{ "Content-Type": "application/json", }, }
Functions ¶
Types ¶
type Branch ¶
type Branch struct {
//
Name string `json:"name"`
WebURL string `json:"web_url"`
CanPush bool `json:"can_push"`
IsDefault bool `json:"default"`
IsProtected bool `json:"protected"`
IsMerged bool `json:"merged"`
DevelopersCanPush bool `json:"developers_can_push"`
DevelopersCanMerge bool `json:"developers_can_merge"`
//
Commit Commit `json:"commit"`
// contains filtered or unexported fields
}
func (*Branch) Delete ¶
func (r *Branch) Delete(req *DeleteRequest) error
type BranchImpl ¶
type BranchImpl interface {
Create(req *CreateRequest) (*Branch, error)
Get(req *GetRequest) (*Branch, error)
Delete(req *DeleteRequest) error
}
func New ¶
func New(client client.Client) BranchImpl
type Commit ¶
type Commit struct {
ID string `json:"id"`
ShortID string `json:"short_id"`
Title string `json:"title"`
Author string `json:"author_name"`
Message string `json:"message"`
AuthorEmail string `json:"author_email"`
AuthoredDate time.Time `json:"authored_date"`
Committer string `json:"committer_name"`
CommitterEmail string `json:"committer_email"`
CommittedDate time.Time `json:"committed_date"`
WebURL string `json:"web_url"`
CreatedAt time.Time `json:"created_at"`
ParentIDs []string `json:"parent_ids"`
}
type CreateRequest ¶
type CreateResponse ¶
type CreateResponse = Branch
func Create ¶
func Create(client client.Client, req *CreateRequest) (*CreateResponse, error)
type DeleteRequest ¶
type GetRequest ¶
type GetResponse ¶
type GetResponse = Branch
func Get ¶
func Get(client client.Client, cfg *GetRequest) (*GetResponse, error)
Click to show internal directories.
Click to hide internal directories.