client

package
v0.0.0-...-5ee5e5d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASArtifacts

type ASArtifacts struct {
	Image    ASCategory `json:"image"`
	Function ASCategory `json:"function"`
	Cf       ASCategory `json:"cf"`
}

ASArtifacts is an Application Scope category

type ASCategory

type ASCategory struct {
	Expression string       `json:"expression"`
	Variables  []ASVariable `json:"variables"`
}

ASCategory is the generic struct for Application Scope Categories

type ASInfrastructure

type ASInfrastructure struct {
	Kubernetes ASCategory `json:"kubernetes"`
	Os         ASCategory `json:"os"`
}

Infrastructure is an Application Scope category

type ASVariable

type ASVariable struct {
	Attribute string `json:"attribute"`
	Value     string `json:"value"`
}

ASVariable is the generic variable payload for Application Scoping Categorizes

type ASWorkloads

type ASWorkloads struct {
	Kubernetes ASCategory `json:"kubernetes"`
	Os         ASCategory `json:"os"`
	Cf         ASCategory `json:"cf"`
}

ASWorkloads is an Application Scope category

type ApplicationScope

type ApplicationScope struct {
	Name        string    `json:"name"`
	Description string    `json:"description,omitempty"`
	OwnerEmail  string    `json:"owner_email,omitempty"`
	Author      string    `json:"author,omitempty"`
	UpdatedAt   time.Time `json:"updated_at,omitempty"`
	Categories  struct {
		Artifacts      ASArtifacts      `json:"artifacts"`
		Workloads      ASWorkloads      `json:"workloads"`
		Infrastructure ASInfrastructure `json:"infrastructure"`
	} `json:"categories"`
}

ApplicationScope is the payload for creating an application scope URL: /api/v2/access_management/scopes

type Client

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

Client is the REST API client that communicates with Aqua cli

func NewClient

func NewClient(url, user, password string) *Client

NewClient - initialize and return the Client

func (*Client) CalcNext

func (cli *Client) CalcNext(remaining, next int) (int, int)

CalcNext determines if there are remaining items and return 0 if not Accepts - Remaining count of items and the next page in the query

func (*Client) CalcRemaining

func (cli *Client) CalcRemaining(pagesize, page, count int) int

CalcRemaining - determine the remaining amount of items based on count, pagesize and current page number Accepts - Pagesize, Current Page and Total Count (int) Returns - int of remaining items

func (*Client) ChangePassword

func (cli *Client) ChangePassword(password NewPassword) error

ChangePassword modifies the user's password

func (*Client) CreateApplicationScope

func (cli *Client) CreateApplicationScope(scope ApplicationScope) error

CreateApplicationScope creates a new application scope in Aqua Enterprise API

func (*Client) CreateEnforcerGroup

func (cli *Client) CreateEnforcerGroup(group EnforcerGroup) error

CreateEnforcerGroup - creates single Aqua enforcer group

func (*Client) CreateImageAssurance

func (cli *Client) CreateImageAssurance(policy assurance.Image) string

CreateImageAssurance - Create new Image Assurance Policy Post the parameters as a JSON body Param: assurance_type: string - Type of assurance policy (image, host, function, cf application) Param: name: string - Name of the new policy | !128 character limit Param: description: string - Description of the policy Param: author: string - Name of user account that created the policy | !Required Param: last_update: string - timestamp of last update Param: cvss_severity_enabled: bool - scan the cvss severity or not Param: cvss_severity: bool - identifier of the cvss severity Param: cvss_severity_exclude_no_fix: bool - Indicates that policy should ignore cvss cases that do not have a known fix Param: maximum_score_enabled: bool - Indicates if exceeding the maximum score is scanned Param: maximum_score: int32 - value of allowed maximum score Param: maximum_score_exclude_no_fix: bool - Indicates that policy should ignore cases that do not have a known fix Param: custom_checks_enabled: bool - Indicates if scanning should include custom checks | !Doesnt work with Dockerless scanning Param: scap_enabled: bool - Indicates if scanning should include scap Param: cves_black_list_enabled: bool - Indicates if cves blacklist is relevant Param: cves_white_list_enabled: bool - Indicates if cves whitelist is relevant Param: packages_black_list_enabled: bool - Enable package blacklist Param: packages_white_list_enabled: bool - Enable package whitelist Param: only_none_root_users: bool - Only allow non-root users control Param: trusted_base_images_enabled: bool - Activate base image control Param: scan_sensitive_data: bool - Activate and enable Sensitive data scan Param: audit_on_failure: bool - Send audit event if assurance policy fails Param: fail_cicd: bool - Send Exit Code to scan results Param: block_failed: bool - Block non-compliant images control Param: disallow_malware: bool - Block malware control Param: blacklist_licenses_enabled: bool - Activate the open source license blacklist control Param: blacklisted_licenses: []string - Slice of open source licenses to blacklist Param: whitelisted_licenses_enabled: bool - Activate the open source license whitelist control Param: whitelisted_licenses: []string - Slice of open source licenses to whitelist Param: custom_checks: []assurance.Script - Slice of assurance.Script objects to json Param: scap_files: []assurance.Script - Slice of assurance.Script objects to json Param: scope: []assurance.Image.Scope - Slice of scope expressions Param: registries: []string - Slice of registries Param: labels: []string - Slice of labels Param: images: []string - Slice of images Param: cves_black_list: []string - Slice of cves to blacklist Param: cves_white_list: []string - Slice of cves to whitelist Param: packages_black_list: []string - Slice of packages to blacklist Param: packages_white_list: []string - Slice of packages to whitelist Param: allowed_images: []assurance.ImageID - Slice of images by ID Param: trusted_base_images: []assurance.ImageID - Slice of images by ID Param: readonly: bool - Enable readonly policy permissions Param: force_microenforcer: bool - Verify the Entrypoint is microenforcer Param: domain: string - Name of the container image Param: partial_results_image_fail: bool - return partial results if the image fails assurance check Param: control_exclude_no_fix: bool - Enable the No Fix Available exception control Param: ignore_recently_published_vln: bool - Enable the Recently published exception Param: ignore_recently_published_vln_period: int32 - Number of days to exclude recent vulnerabilities Param: ignore_risk_resources_enabled: bool - Ignore specific repositories Param: ignored_risk_resources: []string - Slice of ignored resources Param: docker_cis_enabled: bool - Enable Docker benchmark for host assurance Param: kube_cis_enabled: bool - Enable Kubernetes benchmark for host assurance Param: enforce_excessive_permissions: bool - Yeah Param: linux_cis_enabled: bool - Enable Linux benchmark for host assurance Param: openshift_hardening_enabled: bool - Enable Openshift benchmark for host assurance Param: function_integrity_enabled: bool - Enable serverless integrity

func (*Client) CreatePermissionSet

func (cli *Client) CreatePermissionSet(ps PermissionSet) error

CreatePermissionSet - creates single Aqua permission set

func (*Client) CreateRegistry

func (cli *Client) CreateRegistry(reg Registry) error

CreateRegistry - creates single Aqua registry

func (*Client) CreateRole

func (cli *Client) CreateRole(role Role) error

CreateRole - creates single Aqua Role

func (*Client) CreateServerlessProject

func (cli *Client) CreateServerlessProject(proj ServerlessProject) error

CreateServerlessProject - creates single Aqua Serverless Function Project

func (*Client) CreateUser

func (cli *Client) CreateUser(user User) error

CreateUser - creates single Aqua user

func (*Client) DeleteApplicationScope

func (cli *Client) DeleteApplicationScope(name string) error

DeleteApplicationScope

func (*Client) DeleteEnforcerGroup

func (cli *Client) DeleteEnforcerGroup(name string) error

DeleteEnforcerGroup removes an enforcer group

func (*Client) DeletePermissionSet

func (cli *Client) DeletePermissionSet(name string) error

DeletePermissionSet removes a permission set

func (*Client) DeleteRegistry

func (cli *Client) DeleteRegistry(name string) error

DeleteRegistry removes a registry

func (*Client) DeleteRole

func (cli *Client) DeleteRole(name string) error

DeleteRole removes a Role

func (*Client) DeleteServerlessProject

func (cli *Client) DeleteServerlessProject(name string) error

DeleteServerlessProject removes a Serverless Project

func (*Client) DeleteUser

func (cli *Client) DeleteUser(name string) error

DeleteUser removes a user

func (*Client) GetAllImages

func (cli *Client) GetAllImages(page, pagesize int, paramsString map[string]string, paramsBool map[string]bool) (images.Images, int, int, int)

GetAllImages - retrieves all registered Images with params and pagination Accepts the CSP struct, page number, pagesize and params map Returns Images struct, remaining count and next page v2/images

func (*Client) GetApplicationScope

func (cli *Client) GetApplicationScope(name string) (*ApplicationScope, error)

GetApplicationScope retrieves an application scope from the Aqua API by scope name

func (*Client) GetApplicationScopes

func (cli *Client) GetApplicationScopes() ([]ApplicationScope, error)

GetApplicationScopes retrieves all application scopes from the Aqua API

func (*Client) GetAssurancePolicies

func (cli *Client) GetAssurancePolicies(paramsString map[string]string) assurance.Policies

GetAssurancePolicies - gets all Assurance Policy types Params: identifiers_only bool (true|false), order_by string (name) Returns: Struct from types/assurance/policies

func (*Client) GetAssuranceScriptID

func (cli *Client) GetAssuranceScriptID(ID string) assurance.Script

GetAssuranceScriptID - retrieves user created assurance script by ID Params: ID: string representation of the script ID (0,1,2 etc) Path - /api/v2/image_assurance/user_scripts/<ID> Returns: Struct from types/assurance/script

func (*Client) GetAssuranceScripts

func (cli *Client) GetAssuranceScripts(paramsString map[string]string) assurance.Scripts

GetAssuranceScripts - retrieves user created assurance scripts Params: search, order_by (name|num_users), engine (ab|sh|yaml), type (), name, id Returns: Struct from types/assurance/scripts

func (*Client) GetAuthToken

func (cli *Client) GetAuthToken() bool

GetAuthToken - Connect to Aqua and return a JWT bearerToken (string) Return: bool - successfully connected?

func (*Client) GetBoolParams

func (cli *Client) GetBoolParams(params map[string]bool) string

GetBoolParams creates a string from a map of boolean parameters Accepts - Parameter map of bool Returns - String formatted for URL query (key=value)

func (*Client) GetContainers

func (cli *Client) GetContainers(page, pagesize int, paramsString map[string]string) (containers.Containers, int, int, int)

GetContainers - retrieves all running containers with params and pagination Accepts the CSP struct, page number, pagesize and params map Returns response struct, remaining count and next page v2/images

func (*Client) GetDetailID

func (cli *Client) GetDetailID(ID string) infrastructure.Detail

GetDetailID - gets a single infrastructure asset by ID Path v2/infrastructure/<id> Return - infrastructure.Detail response struct NOTE - may only work for Nodes, not Clusters??

func (*Client) GetDetailName

func (cli *Client) GetDetailName(infraType, name string) infrastructure.Detail

GetDetailName - gets a single infrastructure asset by name Path v2/infrastructure/<type>/<name> (type can be cluster or node Return - infrastructure.Detail response struct

func (*Client) GetEnforcerGroup

func (cli *Client) GetEnforcerGroup(name string) (*EnforcerGroup, error)

GetEnforcerGroup - returns single Enforcer group hard-coded page size of 100 for now

func (*Client) GetEnforcerGroups

func (cli *Client) GetEnforcerGroups() ([]EnforcerGroup, error)

GetEnforcerGroups - returns all Enforcer groups

func (*Client) GetGateways

func (cli *Client) GetGateways() gateways.Gateways

GetGateways retrieves the list of gateways

func (*Client) GetHosts

func (cli *Client) GetHosts(paramsString map[string]string) infrastructure.Hosts

GetHosts /api/v1/hosts?hosts= hosts options are connected and disconnected

func (*Client) GetImage

func (cli *Client) GetImage(registry, repo, tag string) (images.Image, error)

GetImage - retrieves a single image based on registry, repo and tag Accepts the registry, repo and tag Returns Image struct v2/images/registry/repo/tag

func (*Client) GetImageAssurance

func (cli *Client) GetImageAssurance() assurance.Images

GetImageAssurance - Gets all image assurance policies Returns: Struct from types/assurance/images

func (*Client) GetImageAssuranceName

func (cli *Client) GetImageAssuranceName(name string) (assurance.Image, error)

GetImageAssuranceName - This returns the Image Assurance Policy by name Params: name: The name of the Image Assurance Policy Returns: The struct from types/assurance/image

func (*Client) GetImagePermissions

func (cli *Client) GetImagePermissions() assurance.PermissionList

GetImagePermissions returns the globally whitelisted and blacklisted images Returns: Struct from types/assurance/permission-list

func (*Client) GetInfrastructure

func (cli *Client) GetInfrastructure(page, pagesize int, paramsString map[string]string, paramsBool map[string]bool) (infrastructure.List, int, int, int)

GetInfrastructure - retrieves all infrastructure Query Parameters are page number, pagesize and string and bool map Returns response struct, remaining count and next page v2/infrastructure

func (*Client) GetLayers

func (cli *Client) GetLayers(registry, repo, tag string, page, pagesize int, paramsString map[string]string, paramsBool map[string]bool) (images.Layers, int, int, int)

GetLayers - retrieves all layers from a particular image Accepts the registry, repo and tag strings as well as the page number, pagesize and params map Returns response struct, remaining count and next page v2/images

func (*Client) GetMalware

func (cli *Client) GetMalware(registry, repo, tag string) images.Malware

GetMalware - retrieves malware for a single image based on registry, repo and tag Accepts the registry, repo and tag Returns malware struct v2/images/registry/repo/tag/sensitive

func (*Client) GetOverview

func (cli *Client) GetOverview(paramsString map[string]string) dashboard.Overview

GetOverview retrieves the first page dashboard statistics from v1/dashboard query parameters registry=&hosts=&containers_app= hosts doesn't do anything in this query, should call the hosts api directly containers_app refers to Aqua Services response is Overview struct

func (*Client) GetPermissionSet

func (cli *Client) GetPermissionSet(name string) (*PermissionSet, error)

GetPermissionSet - returns single Aqua permission set

func (*Client) GetPermissionSets

func (cli *Client) GetPermissionSets() (*PermissionSets, error)

GetPermissionSets - returns all Aqua permission sets

func (*Client) GetRegistries

func (cli *Client) GetRegistries() (*[]Registry, error)

GetRegistries - retrieves all configured registry integrations

func (*Client) GetRegistry

func (cli *Client) GetRegistry(name string) (*Registry, error)

func (*Client) GetRepositories

func (cli *Client) GetRepositories(page, pagesize int, paramsString map[string]string) (images.Repositories, int, int, int)

GetRepositories - retrieves all configured repositories Returns Repository struct Path - api/v2/repositories

func (*Client) GetRiskCount

func (cli *Client) GetRiskCount() risks.Counts

GetRiskCount - retrieves risk counts Returns risks.Counts struct Path - v2/risks

func (*Client) GetRiskVulnerabilities

func (cli *Client) GetRiskVulnerabilities(page, pagesize int, paramsString map[string]string) (risks.Vulnerabilities, int, int, int)

GetRiskVulnerabilities - retrieves all at risk vulnerabilities Returns Repository struct Path - api/v2/repositories

func (*Client) GetRisksAcknowledge

func (cli *Client) GetRisksAcknowledge(paramsString map[string]string) (risks.Acknowledgements, int, int, int)

GetRisksAcknowledge retrieves a list of vulnerabilities whose risk has been accepted Param: page: int - Page to retrieve Param: page_size: int - number of elements to retrieve Param: fix_availability: bool - retrieve only elements which do or do not have a fix version available Param: text_search: string - search and retrieve elements that match search string Param: order_by: string - order based on specific fields (-field to reverse the order)

func (*Client) GetRole

func (cli *Client) GetRole(name string) (*Role, error)

GetRole - returns single Aqua Role

func (*Client) GetRoles

func (cli *Client) GetRoles() ([]Role, error)

GetRoles - returns all Aqua Roles

func (*Client) GetScanHistory

func (cli *Client) GetScanHistory(registry, repo, tag string) (images.ScanHistories, error)

GetScanHistory - retrieves a single image scan history based on registry, repo and tag Path parameters of {registry}, {repo} and {tag} Returns response struct v2/images/{registry}/{repo}/{tag}/scan_history

func (*Client) GetSensitive

func (cli *Client) GetSensitive(registry, repo, tag string) images.Sensitive

GetSensitive - retrieves sensitive data for a single image based on registry, repo and tag Accepts the registry, repo and tag Returns sensitive struct v2/images/registry/repo/tag/sensitive

func (*Client) GetServerlessProject

func (cli *Client) GetServerlessProject(name string) (*ServerlessProject, error)

GetServerlessProject - returns single Aqua Serverless Function Project

func (*Client) GetServerlessProjects

func (cli *Client) GetServerlessProjects() ([]ServerlessProject, error)

GetServerlessProjects is the return of all serverless projects

func (*Client) GetStringParams

func (cli *Client) GetStringParams(params map[string]string) string

GetStringParams builds a string from a string map of parameters Accepts - Parameter map of strings Returns - String formatted for URL query (key=value)

func (*Client) GetTrends

func (cli *Client) GetTrends(trend string) dashboard.Trends

GetTrends retrieves the first page dashboard trends from v1/dashboard/<trend>/trends path parameters are containers,images,vulnerabilities response is Trends struct

func (*Client) GetUser

func (cli *Client) GetUser(name string) (*User, error)

GetUser - returns single Aqua user

func (*Client) GetUsers

func (cli *Client) GetUsers() ([]User, error)

GetUsers - returns all Aqua users

func (*Client) GetVulnerabilities

func (cli *Client) GetVulnerabilities(registry, repo, tag string, page, pagesize int, paramsString map[string]string, paramsBool map[string]bool) (images.Vulnerabilities, int, int, int)

GetVulnerabilities - retrieves all vulnerabilities from a particular image Accepts the registry, repo and tag strings as well as the page number, pagesize and params map Returns response struct, remaining count and next page v2/images

func (*Client) InspectContainer

func (cli *Client) InspectContainer(ID, hostID string) containers.Inspect

InspectContainer - retrieves metadata from running container Accepts container id and host id Returns response struct v1/containers/{id}/{host_id}/inspect

func (*Client) UpdateApplicationScope

func (cli *Client) UpdateApplicationScope(as ApplicationScope) error

UpdateApplicationScope updates an existing application scope in Aqua Enterprise API

func (*Client) UpdateEnforcerGroup

func (cli *Client) UpdateEnforcerGroup(group EnforcerGroup) error

UpdateEnforcerGroup updates an existing enforcer group hardcoded update_enforcers parameter to true (for now)

func (*Client) UpdatePermissionSet

func (cli *Client) UpdatePermissionSet(ps PermissionSet) error

UpdatePermissionSet updates an existing permission set

func (*Client) UpdateRegistry

func (cli *Client) UpdateRegistry(reg Registry) error

UpdateRegistry updates an existing registry

func (*Client) UpdateRole

func (cli *Client) UpdateRole(role Role) error

UpdateRole updates an existing Role

func (*Client) UpdateServerlessProject

func (cli *Client) UpdateServerlessProject(proj ServerlessProject) error

UpdateServerlessProject updates an existing Serverless Function Project

func (*Client) UpdateUser

func (cli *Client) UpdateUser(user User) error

UpdateUser updates an existing user

type EnforcerCommand

type EnforcerCommand struct {
	Default    string `json:"default"`
	Kubernetes string `json:"kubernetes"`
	Swarm      string `json:"swarm"`
	Windows    string `json:"windows"`
}

type EnforcerGroup

type EnforcerGroup struct {
	ID                                        string               `json:"id"`
	Logicalname                               string               `json:"logicalname"`
	Type                                      string               `json:"type"`
	EnforcerImageName                         string               `json:"enforcer_image_name"`
	Description                               string               `json:"description"`
	Gateways                                  []string             `json:"gateways"`
	GatewayName                               string               `json:"gateway_name"`
	GatewayAddress                            string               `json:"gateway_address"`
	Enforce                                   bool                 `json:"enforce"`
	ContainerActivityProtection               bool                 `json:"container_activity_protection"`
	NetworkProtection                         bool                 `json:"network_protection"`
	HostNetworkProtection                     bool                 `json:"host_network_protection"`
	UserAccessControl                         bool                 `json:"user_access_control"`
	ImageAssurance                            bool                 `json:"image_assurance"`
	HostProtection                            bool                 `json:"host_protection"`
	AuditAll                                  bool                 `json:"audit_all"`
	AuditSuccessLogin                         bool                 `json:"audit_success_login"`
	AuditFailedLogin                          bool                 `json:"audit_failed_login"`
	LastUpdate                                int                  `json:"last_update"`
	Token                                     string               `json:"token"`
	Command                                   EnforcerCommand      `json:"command"`
	Orchestrator                              EnforcerOrchestrator `json:"orchestrator"`
	HostOs                                    string               `json:"host_os"`
	InstallCommand                            string               `json:"install_command"`
	HostsCount                                int                  `json:"hosts_count"`
	DisconnectedCount                         int                  `json:"disconnected_count"`
	ConnectedCount                            int                  `json:"connected_count"`
	HighVulns                                 int                  `json:"high_vulns"`
	MedVulns                                  int                  `json:"med_vulns"`
	LowVulns                                  int                  `json:"low_vulns"`
	NegVulns                                  int                  `json:"neg_vulns"`
	SyscallEnabled                            bool                 `json:"syscall_enabled"`
	RuntimeType                               string               `json:"runtime_type"`
	SyncHostImages                            bool                 `json:"sync_host_images"`
	RiskExplorerAutoDiscovery                 bool                 `json:"risk_explorer_auto_discovery"`
	RuntimePolicyName                         string               `json:"runtime_policy_name"`
	PasDeploymentLink                         string               `json:"pas_deployment_link"`
	AquaVersion                               string               `json:"aqua_version"`
	AllowKubeEnforcerAudit                    bool                 `json:"allow_kube_enforcer_audit"`
	AutoDiscoveryEnabled                      bool                 `json:"auto_discovery_enabled"`
	AutoDiscoverConfigureRegistries           bool                 `json:"auto_discover_configure_registries"`
	AutoScanDiscoveredImagesRunningContainers bool                 `json:"auto_scan_discovered_images_running_containers"`
	AdmissionControl                          bool                 `json:"admission_control"`
	MicroEnforcerInjection                    bool                 `json:"micro_enforcer_injection"`
	Permission                                string               `json:"permission"`
	MicroEnforcerImageName                    string               `json:"micro_enforcer_image_name"`
	MicroEnforcerSecretsName                  string               `json:"micro_enforcer_secrets_name"`
	BlockAdmissionControl                     bool                 `json:"block_admission_control"`
}

EnforcerGroup is the request and response format for an Enforcer Group (hostbatch)

type EnforcerOrchestrator

type EnforcerOrchestrator struct {
	Type           string `json:"type"`
	Master         bool   `json:"master"`
	ServiceAccount string `json:"service_account,omitempty"`
	Namespace      string `json:"namespace,omitempty"`
}

type NewPassword

type NewPassword struct {
	Name     string `json:"name"`
	Password string `json:"new_password"`
}

NewPassword represents a password change

type PermissionSet

type PermissionSet struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Author      string    `json:"author"`
	UpdatedAt   time.Time `json:"updated_at,omitempty"`
	UIAccess    bool      `json:"ui_access"`
	IsSuper     bool      `json:"is_super"`
	Actions     []string  `json:"actions"`
}

type PermissionSets

type PermissionSets struct {
	Count            int             `json:"count"`
	Page             int             `json:"page"`
	Pagesize         int             `json:"pagesize"`
	Result           []PermissionSet `json:"result"`
	MoreDataAllPages int             `json:"more_data_all_pages"`
}

type Registry

type Registry struct {
	Name                     string      `json:"name"`
	Type                     string      `json:"type"` // [HUB, V1/V2, ENGINE, AWS, GCR]
	DetectedType             int         `json:"detected_type"`
	Description              string      `json:"description"`
	Author                   string      `json:"author"`
	Lastupdate               int         `json:"lastupdate"`
	URL                      string      `json:"url"`
	Username                 string      `json:"username"`
	Password                 string      `json:"password"`
	AutoPull                 bool        `json:"auto_pull"`
	AutoPullTime             string      `json:"auto_pull_time"`
	AutoPullMax              int         `json:"auto_pull_max"`
	PullRepoPatterns         interface{} `json:"pull_repo_patterns"`
	PullRepoPatternsExcluded interface{} `json:"pull_repo_patterns_excluded"`
	PullTagPatterns          interface{} `json:"pull_tag_patterns"`
	PullMaxTags              int         `json:"pull_max_tags"`
	AutoPullRescan           bool        `json:"auto_pull_rescan"`
	Prefixes                 interface{} `json:"prefixes"`
	Webhook                  struct {
		Enabled      bool   `json:"enabled"`
		URL          string `json:"url"`
		AuthToken    string `json:"auth_token"`
		UnQuarantine bool   `json:"un_quarantine"`
	} `json:"webhook"`
	RegistryScanTimeout int           `json:"registry_scan_timeout"`
	PullImageAge        string        `json:"pull_image_age"`
	PullImageTagPattern []interface{} `json:"pull_image_tag_pattern"`
	AlwaysPullPatterns  []interface{} `json:"always_pull_patterns"`
}

Registry defines a registry

type Role

type Role struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Author      string    `json:"author,omitempty"`
	UpdatedAt   time.Time `json:"updated_at"`
	Permission  string    `json:"permission"`
	Scopes      []string  `json:"scopes"`
	Groups      []string  `json:"groups,omitempty"`
	Users       []string  `json:"users,omitempty"`
}

Role represents a local Aqua Role

type Roles

type Roles struct {
	Count            int    `json:"count"`
	Page             int    `json:"page"`
	Pagesize         int    `json:"pagesize"`
	Result           []Role `json:"result"`
	MoreDataAllPages int    `json:"more_data_all_pages"`
}

Roles represents the API return for multiple roles

type ServerlessProject

type ServerlessProject struct {
	ID                 int      `json:"id,omitempty"`
	Name               string   `json:"name"`
	Description        string   `json:"description,omitempty"`
	Username           string   `json:"username"`
	Password           string   `json:"password,omitempty"`
	Region             string   `json:"region,omitempty"`          // AWS only
	SubscriptionID     string   `json:"subscription_id,omitempty"` // Azure only
	TenantID           string   `json:"tenant_id,omitempty"`       // Azure only
	ComputeProvider    int      `json:"compute_provider"`          // AWS = 1, Azure = 3
	Author             string   `json:"author"`
	Update             int      `json:"update,omitempty"`
	AutoPull           bool     `json:"auto_pull"`
	AutoPullTime       string   `json:"auto_pull_time"`
	AutoPullInProgress bool     `json:"auto_pull_in_progress,omitempty"`
	SqsURL             string   `json:"sqs_url,omitempty"`
	IncludeTags        []string `json:"include_tags,omitempty"`
	ExcludeTags        []string `json:"exclude_tags,omitempty"`
}

ServerlessProject allows the configuration of a function/serverless integration

type User

type User struct {
	ID              string   `json:"id"` // Username
	Password        string   `json:"password,omitempty"`
	PasswordConfirm string   `json:"passwordConfirm,omitempty"`
	Roles           []string `json:"roles,omitempty"`
	Name            string   `json:"name,omitempty"` // Display Name
	Email           string   `json:"email,omitempty"`
	FirstTime       bool     `json:"first_time,omitempty"`
}

User represents a local Aqua user

Jump to

Keyboard shortcuts

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