lib

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageUtil

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

ImageUtil : For repository and tag functions

func NewImageUtil

func NewImageUtil(rootURI string, httpClient *client.APIClient) *ImageUtil

NewImageUtil : Constructor

func (*ImageUtil) DeleteRepo

func (iu *ImageUtil) DeleteRepo(repoName string) error

DeleteRepo : Delete repo

func (*ImageUtil) GetRepos

func (iu *ImageUtil) GetRepos(projectName string) ([]models.Repository, error)

GetRepos : Get repos in the project

func (*ImageUtil) GetTags

func (iu *ImageUtil) GetTags(repoName string) ([]models.Tag, error)

GetTags : Get tags

func (*ImageUtil) ScanTag

func (iu *ImageUtil) ScanTag(repoName string, tagName string) error

ScanTag :Scan a tag

type ProjectUtil

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

ProjectUtil : Util methods for project related

func NewProjectUtil

func NewProjectUtil(rootURI string, httpClient *client.APIClient) *ProjectUtil

NewProjectUtil : Constructor

func (*ProjectUtil) AssignRole

func (pu *ProjectUtil) AssignRole(projectName, username string) error

AssignRole : Assign role to user

func (*ProjectUtil) CreateProject

func (pu *ProjectUtil) CreateProject(projectName string, accessLevel bool) error

CreateProject :Create project

func (*ProjectUtil) DeleteProject

func (pu *ProjectUtil) DeleteProject(projectName string) error

DeleteProject : Delete project

func (*ProjectUtil) GetProjectID

func (pu *ProjectUtil) GetProjectID(projectName string) int

GetProjectID : Get the project ID If no project existing with the name, then return -1

func (*ProjectUtil) GetProjectMember added in v1.5.0

func (pu *ProjectUtil) GetProjectMember(pid int, member string) (*models.ExistingMember, error)

GetProjectMember : Get the project member by name

func (*ProjectUtil) GetProjects

func (pu *ProjectUtil) GetProjects(name string) ([]models.ExistingProject, error)

GetProjects : Get projects If name specified, then only get the specified project

func (*ProjectUtil) RevokeRole

func (pu *ProjectUtil) RevokeRole(projectName string, username string) error

RevokeRole : RevokeRole role from user

type Report

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

func (*Report) Failed

func (r *Report) Failed(caseName string, err error)

Failed case

func (*Report) IsFail

func (r *Report) IsFail() bool

IsFail : Overall result

func (*Report) Passed

func (r *Report) Passed(caseName string)

Passed case

func (*Report) Print

func (r *Report) Print()

Print report

type SystemUtil

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

SystemUtil : For getting system info

func NewSystemUtil

func NewSystemUtil(rootURI, hostname string, httpClient *client.APIClient) *SystemUtil

NewSystemUtil : Constructor

func (*SystemUtil) GetSystemInfo

func (nsu *SystemUtil) GetSystemInfo() error

GetSystemInfo : Get systeminfo

type UserUtil

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

UserUtil : For user related

func NewUserUtil

func NewUserUtil(rootURI string, httpClient *client.APIClient) *UserUtil

NewUserUtil : Constructor

func (*UserUtil) CreateUser

func (uu *UserUtil) CreateUser(username, password string) error

CreateUser : Create user

func (*UserUtil) DeleteUser

func (uu *UserUtil) DeleteUser(username string) error

DeleteUser : Delete testing account

func (*UserUtil) GetUserID

func (uu *UserUtil) GetUserID(username string) int

GetUserID : Get user ID If user with the username is not existing, then return -1

func (*UserUtil) GetUsers

func (uu *UserUtil) GetUsers(name string) ([]models.ExistingUser, error)

GetUsers : Get users If name specified, then return that one

Jump to

Keyboard shortcuts

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