Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAPI ¶
type BaseAPI struct {
beego.Controller
}
BaseAPI wraps common methods for controllers to host API
func (*BaseAPI) DecodeJSONReq ¶
func (b *BaseAPI) DecodeJSONReq(v interface{})
DecodeJSONReq decodes a json request
func (*BaseAPI) RenderError ¶
RenderError provides shortcut to render http error
func (*BaseAPI) ValidateUser ¶
ValidateUser checks if the request triggered by a valid user
type ProjectAPI ¶
type ProjectAPI struct {
BaseAPI
// contains filtered or unexported fields
}
ProjectAPI handles request to /api/projects/{} /api/projects/{}/logs
func (*ProjectAPI) FilterAccessLog ¶
func (p *ProjectAPI) FilterAccessLog()
FilterAccessLog handles GET to /api/projects/{}/logs
type ProjectMemberAPI ¶
type ProjectMemberAPI struct {
BaseAPI
// contains filtered or unexported fields
}
ProjectMemberAPI handles request to /api/projects/{}/members/{}
func (*ProjectMemberAPI) Prepare ¶
func (pma *ProjectMemberAPI) Prepare()
Prepare validates the URL and parms
type RepositoryAPI ¶
type RepositoryAPI struct {
BaseAPI
}
RepositoryAPI handles request to /api/repositories /api/repositories/tags /api/repositories/manifests, the parm has to be put in the query string as the web framework can not parse the URL if it contains veriadic sectors. For repostiories, we won't check the session in this API due to search functionality, querying manifest will be contorlled by the security of registry
func (*RepositoryAPI) GetManifests ¶
func (ra *RepositoryAPI) GetManifests()
GetManifests handles GET /api/repositories/manifests
func (*RepositoryAPI) GetTags ¶
func (ra *RepositoryAPI) GetTags()
GetTags handles GET /api/repositories/tags
type StatisticAPI ¶
type StatisticAPI struct {
BaseAPI
// contains filtered or unexported fields
}
StatisticAPI handles request to /api/statistics/
func (*StatisticAPI) Prepare ¶
func (s *StatisticAPI) Prepare()
Prepare validates the URL and the user
type UserAPI ¶
type UserAPI struct {
BaseAPI
SelfRegistration bool
IsAdmin bool
AuthMode string
// contains filtered or unexported fields
}
UserAPI handles request to /api/users/{}
func (*UserAPI) ChangePassword ¶
func (ua *UserAPI) ChangePassword()
ChangePassword handles PUT to /api/users/{}/password