Documentation ¶
Overview ¶
Package HarborAPI These APIs provide services for manipulating Harbor project.
HarborLogout.go ¶
HarborLogon.go
Index ¶
- type AccessLog
- type HarborAPI
- func (a HarborAPI) HarborLogin(user UsrInfo) (int, error)
- func (a HarborAPI) HarborLogout() (int, error)
- func (a HarborAPI) ProjectsPost(prjUsr UsrInfo, project Project) (int, error)
- func (a HarborAPI) RepositoriesDelete(prjUsr UsrInfo, repoName string, tag string) (int, error)
- func (a HarborAPI) SearchGet(q string) (Search, error)
- type Project
- type Project4Search
- type Repository
- type Repository4Search
- type Role
- type RoleParam
- type Search
- type User
- type UsrInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HarborAPI ¶
type HarborAPI struct {
// contains filtered or unexported fields
}
func NewHarborAPI ¶
func NewHarborAPI() *HarborAPI
func (HarborAPI) HarborLogout ¶
func (HarborAPI) ProjectsPost ¶
Create a new project. Implementation Notes This endpoint is for user to create a new project. @param project New created project. @return void func (a HarborAPI) ProjectsPost (prjUsr UsrInfo, project Project) (int, error) {
func (HarborAPI) RepositoriesDelete ¶
Delete a repository or a tag in a repository. Delete a repository or a tag in a repository. This endpoint let user delete repositories and tags with repo name and tag.\n @param repoName The name of repository which will be deleted. @param tag Tag of a repository. @return void func (a HarborAPI) RepositoriesDelete(prjUsr UsrInfo, repoName string, tag string) (int, error) {
func (HarborAPI) SearchGet ¶
Search for projects and repositories Implementation Notes The Search endpoint returns information about the projects and repositories offered at public status or related to the current logged in user. The response includes the project and repository list in a proper display order. @param q Search parameter for project and repository name. @return []Search func (a HarborAPI) SearchGet (q string) (Search, error) {
type Project ¶
type Project struct { ProjectId int32 `json:"id,omitempty"` OwnerId int32 `json:"owner_id,omitempty"` ProjectName string `json:"project_name,omitempty"` CreationTime string `json:"creation_time,omitempty"` Deleted int32 `json:"deleted,omitempty"` UserId int32 `json:"user_id,omitempty"` OwnerName string `json:"owner_name,omitempty"` Public bool `json:"public,omitempty"` Togglable bool `json:"togglable,omitempty"` }
type Project4Search ¶
type Repository ¶
type Repository struct { Id string `json:"id,omitempty"` Parent string `json:"parent,omitempty"` Created time.Time `json:"created,omitempty"` DurationDays string `json:"duration_days,omitempty"` Author string `json:"author,omitempty"` Architecture string `json:"architecture,omitempty"` DockerVersion string `json:"docker_version,omitempty"` Os string `json:"os,omitempty"` }
type Repository4Search ¶
type Search ¶
type Search struct { Projects []Project4Search `json:"project,omitempty"` Repositories []Repository4Search `json:"repository,omitempty"` }
type User ¶
type User struct { UserId int32 `json:"user_id,omitempty"` Username string `json:"username,omitempty"` Email string `json:"email,omitempty"` Password string `json:"password,omitempty"` Realname string `json:"realname,omitempty"` Comment string `json:"comment,omitempty"` Deleted int32 `json:"deleted,omitempty"` }