client

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigEmail

func GetConfigEmail(d *schema.ResourceData) models.ConfigBodyPost

func GetConfigSystem

func GetConfigSystem(d *schema.ResourceData) models.ConfigBodyPost

func GetID

func GetID(body string) (id string, err error)

GetID gets the resource id from location response header

func GetRegistryBody added in v0.3.0

func GetRegistryBody(d *schema.ResourceData) models.RegistryBody

func GetRegistryType added in v1.2.0

func GetRegistryType(regType string) (regName string, err error)

func GetRententionBody added in v1.0.0

func GetRententionBody(d *schema.ResourceData) *models.Retention

func GetReplicationBody added in v0.3.0

func GetReplicationBody(d *schema.ResourceData) models.ReplicationBody

func GetSchedule

func GetSchedule(schedule string) (typefmt string, cronfmt string)

func GetSystemBoby added in v0.6.0

func GetSystemBoby(d *schema.ResourceData, scheduleType string) models.SystemBody

func GroupType

func GroupType(group string) (x int)

func LabelsBody added in v0.7.0

func LabelsBody(d *schema.ResourceData) models.Labels

func ProjectBody

ProjectBody return a json body

func ProjectMembersGroupBody

func ProjectMembersGroupBody(d *schema.ResourceData) models.ProjectMembersBody

func ProjectMembersUserBody

func ProjectMembersUserBody(d *schema.ResourceData) models.ProjectMembersBody

func RobotBody

func RobotBody(d *schema.ResourceData, projectid string) models.RobotBody

func RoleType

func RoleType(role string) (x int)

func RoleTypeNumber

func RoleTypeNumber(role int) (x string)

func SetAuthValues added in v1.1.0

func SetAuthValues(d *schema.ResourceData, resp string) error

SetAuthValues the values for Auth when performing a read on resource

func UserBody

func UserBody(d *schema.ResourceData) models.UserBody

UserBody return a json body

Types

type Client

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

func NewClient

func NewClient(url string, username string, password string, insecure bool) *Client

NewClient creates common settings

func (*Client) SendRequest

func (c *Client) SendRequest(method string, path string, payload interface{}, statusCode int) (value string, respheaders string, err error)

SendRequest send a http request

func (*Client) SetDefaultScanner

func (client *Client) SetDefaultScanner(scanner string) (err error)

SetDefaultScanner set the default scanner within harbor

func (*Client) SetSchedule added in v0.6.0

func (client *Client) SetSchedule(d *schema.ResourceData, scheduleType string) (err error)

SetSchedule sets the schedule time to perform Vuln scanning and GC

Jump to

Keyboard shortcuts

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