aqua

package
v0.0.0-...-53f5876 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package aqua provides interface into Aqua Enterprise CSP Platform

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aqua

type Aqua struct {
	Host               string
	Port               int
	ID                 string
	Password           string
	URL                string
	Secure             bool
	Token              string `json:"token"`
	InsecureSkipVerify bool
	RestClient         gorequest.SuperAgent
	LicenseType        string `json:"license_type"`
	Scopes             []string
	User               map[string]interface{} `json:"user"`
	License            map[string]interface{} `json:"license"`
}

Aqua is the main interface used to interact with Aqua's Enterprise platform API endpoint.

func NewCSP

func NewCSP(host string, port int, id string, password string, secureEndpoint ...bool) (*Aqua, error)

NewCSP - is used to obtain functioning Aqua Enterprise API endpoint secureEndpoint is optional. if supplied expecting 2 bool values. First value is whether or not Aqua is listenting on secure URL Second is whether or not to InsecureSkipVerify

func (*Aqua) CreateRegistry

func (aqua *Aqua) CreateRegistry(name, description, registryType, url, username, password string, prefixes []string, auto_pull bool, auto_pull_max int64, autoPullTime string) error

func (*Aqua) DeleteRegistry

func (aqua *Aqua) DeleteRegistry(name string) error

func (*Aqua) GetRegistry

func (aqua *Aqua) GetRegistry(name string) (Registry, error)

func (*Aqua) UpdateRegistry

func (aqua *Aqua) UpdateRegistry(name, description, registryType, url, username, password string, prefixes []string, auto_pull bool, auto_pull_max int64, autoPullTime string) error

type Registry

type Registry struct {
	Name         string   `json:"name"`
	Type         string   `json:"type"`
	URL          string   `json:"url"`
	Username     string   `json:"username"`
	Password     string   `json:password"`
	AutoPull     bool     `json:"auto_pull"`
	AutoPullMax  int64    `json:"auto_pull_max"`
	AutoPullTime string   `json:"auto_pull_time"`
	Prefixes     []string `json:"prefixes"`
	Description  string   `json:"description"`
}

Jump to

Keyboard shortcuts

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