HarborAPI

package
v0.0.0-...-aa03a8f Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2016 License: Apache-2.0, BSD-3-Clause, CC-BY-3.0, + 3 more Imports: 7 Imported by: 0

Documentation

Overview

Package HarborAPI These APIs provide services for manipulating Harbor project.

HarborLogout.go

HarborLogon.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {
	Username       string `json:"username,omitempty"`
	Keywords       string `json:"keywords,omitempty"`
	BeginTimestamp int32  `json:"beginTimestamp,omitempty"`
	EndTimestamp   int32  `json:"endTimestamp,omitempty"`
}

type HarborAPI

type HarborAPI struct {
	// contains filtered or unexported fields
}

func NewHarborAPI

func NewHarborAPI() *HarborAPI

func NewHarborAPIWithBasePath

func NewHarborAPIWithBasePath(basePath string) *HarborAPI

func (HarborAPI) HarborLogin

func (a HarborAPI) HarborLogin(user UsrInfo) (int, error)

func (HarborAPI) HarborLogout

func (a HarborAPI) HarborLogout() (int, error)

func (HarborAPI) ProjectsPost

func (a HarborAPI) ProjectsPost(prjUsr UsrInfo, project Project) (int, error)

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

func (a HarborAPI) RepositoriesDelete(prjUsr UsrInfo, repoName string, tag string) (int, error)

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

func (a HarborAPI) SearchGet(q string) (Search, error)

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 Project4Search struct {
	ProjectId   int32  `json:"id,omitempty"`
	ProjectName string `json:"name,omitempty"`
	Public      int32  `json:"public,omitempty"`
}

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 Repository4Search struct {
	ProjectId     int32  `json:"project_id,omitempty"`
	ProjectName   string `json:"project_name,omitempty"`
	ProjectPublic int32  `json:"project_public,omitempty"`
	RepoName      string `json:"repository_name,omitempty"`
}

type Role

type Role struct {
	RoleId   int32  `json:"role_id,omitempty"`
	RoleCode string `json:"role_code,omitempty"`
	RoleName string `json:"role_name,omitempty"`
}

type RoleParam

type RoleParam struct {
	Roles    []int32 `json:"roles,omitempty"`
	UserName string  `json:"user_name,omitempty"`
}
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"`
}

type UsrInfo

type UsrInfo struct {
	Name   string
	Passwd string
}

Jump to

Keyboard shortcuts

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