api

package
v0.0.0-...-171028a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2016 License: Apache-2.0, BSD-3-Clause, CC-BY-3.0, + 3 more Imports: 14 Imported by: 0

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) Render

func (b *BaseAPI) Render() error

Render returns nil as it won't render template

func (*BaseAPI) RenderError

func (b *BaseAPI) RenderError(code int, text string)

RenderError provides shortcut to render http error

func (*BaseAPI) ValidateUser

func (b *BaseAPI) ValidateUser() int

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

func (*ProjectAPI) Get

func (p *ProjectAPI) Get()

Get ...

func (*ProjectAPI) Head

func (p *ProjectAPI) Head()

Head ...

func (*ProjectAPI) Post

func (p *ProjectAPI) Post()

Post ...

func (*ProjectAPI) Prepare

func (p *ProjectAPI) Prepare()

Prepare validates the URL and the user

func (*ProjectAPI) Put

func (p *ProjectAPI) Put()

Put ...

type ProjectMemberAPI

type ProjectMemberAPI struct {
	BaseAPI
	// contains filtered or unexported fields
}

ProjectMemberAPI handles request to /api/projects/{}/members/{}

func (*ProjectMemberAPI) Delete

func (pma *ProjectMemberAPI) Delete()

Delete ...

func (*ProjectMemberAPI) Get

func (pma *ProjectMemberAPI) Get()

Get ...

func (*ProjectMemberAPI) Post

func (pma *ProjectMemberAPI) Post()

Post ...

func (*ProjectMemberAPI) Prepare

func (pma *ProjectMemberAPI) Prepare()

Prepare validates the URL and parms

func (*ProjectMemberAPI) Put

func (pma *ProjectMemberAPI) Put()

Put ...

type RepositoryAPI

type RepositoryAPI struct {
	BaseAPI
	// contains filtered or unexported fields
}

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) Get

func (ra *RepositoryAPI) Get()

Get ...

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

func (*RepositoryAPI) Prepare

func (ra *RepositoryAPI) Prepare()

Prepare will set a non existent user ID in case the request tries to view repositories under a project he doesn't has permission.

type SearchAPI

type SearchAPI struct {
	BaseAPI
}

SearchAPI handles requesst to /api/search

func (*SearchAPI) Get

func (n *SearchAPI) Get()

Get ...

type UserAPI

type UserAPI struct {
	BaseAPI
	// contains filtered or unexported fields
}

UserAPI handles request to /api/users/{}

func (*UserAPI) Delete

func (ua *UserAPI) Delete()

Delete ...

func (*UserAPI) Get

func (ua *UserAPI) Get()

Get ...

func (*UserAPI) Prepare

func (ua *UserAPI) Prepare()

Prepare validates the URL and parms

func (*UserAPI) Put

func (ua *UserAPI) Put()

Put ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL