Documentation
¶
Index ¶
- Constants
- Variables
- func Routes(r *gin.Engine, h *Handler)
- func WriteErr(ctx *gin.Context, status int, msg string, errs ...error)
- type CommitForm
- type ContentTypeFilter
- type CreateBranchForm
- type DeleteBranchUri
- type ErrorModel
- type FileContentForm
- type FileURI
- type Handler
- func (h *Handler) CreateBranch(ctx *gin.Context)
- func (h *Handler) CreateFile(ctx *gin.Context)
- func (h *Handler) DeleteBranch(ctx *gin.Context)
- func (h *Handler) DeleteFile(ctx *gin.Context)
- func (h *Handler) GetBranches(ctx *gin.Context)
- func (h *Handler) GetCommits(ctx *gin.Context)
- func (h *Handler) GetFiles(ctx *gin.Context)
- func (h *Handler) GetRepositories(ctx *gin.Context)
- func (h *Handler) GetRepository(ctx *gin.Context)
- func (h *Handler) UpdateFile(ctx *gin.Context)
- type OwnerUri
- type RefForm
- type RepoURI
- type StatusError
Constants ¶
View Source
const ( HTTPRequestValidationFailed = "HTTP Request Validation failed." UnknownGitProviderError = "An error occured during Git Provider request." )
View Source
const (
RawMimeTypes string = "application/vnd.giteway.raw"
)
Variables ¶
View Source
var NewError = func(status int, msg string) StatusError { return &ErrorModel{ Status: status, Title: http.StatusText(status), Detail: msg, } }
Functions ¶
Types ¶
type CommitForm ¶ added in v0.1.0
type CommitForm struct {
Message *string `form:"message,omitempty" json:"message,omitempty"`
}
type ContentTypeFilter ¶ added in v0.1.2
type CreateBranchForm ¶ added in v0.1.0
type CreateBranchForm struct {
Name string `uri:"name" binding:"required"`
}
type DeleteBranchUri ¶ added in v0.1.0
type ErrorModel ¶ added in v0.1.2
type ErrorModel struct {
Type string `json:"type,omitempty"`
Title string `json:"title,omitempty"`
Status int `json:"status,omitempty"`
Detail string `json:"detail,omitempty"`
}
https://datatracker.ietf.org/doc/html/rfc7807
func (*ErrorModel) Error ¶ added in v0.1.2
func (e *ErrorModel) Error() string
func (*ErrorModel) GetStatus ¶ added in v0.1.2
func (e *ErrorModel) GetStatus() int
type FileContentForm ¶ added in v0.1.0
type FileContentForm struct {
Encoding string `form:"encoding,default=text" json:"encoding"`
Content string `form:"content" json:"content" binding:"required"`
Commit CommitForm `form:"commit,omitempty" json:"commit,omitempty"`
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) CreateBranch ¶ added in v0.1.0
func (*Handler) CreateFile ¶ added in v0.1.0
func (*Handler) DeleteBranch ¶ added in v0.1.0
func (*Handler) DeleteFile ¶ added in v0.1.0
func (*Handler) GetBranches ¶
func (*Handler) GetCommits ¶
Get commits list @Summary Get commits list.
func (*Handler) GetRepositories ¶
Get repositories list @Summary Get repositories list.
func (*Handler) GetRepository ¶
Get repository details. @Summary Get repository details.
func (*Handler) UpdateFile ¶ added in v0.1.0
type StatusError ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.