aws

package
v0.0.0-...-9989cf6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Arn           string `json:"arn"`
	AWSAccountID  string `json:"awsAccountId"`
	BaseAccountID string `json:"baseAccountId"`
	ConnectorID   string `json:"connectorId"`
	Description   string `json:"description"`
	ExternalID    string `json:"externalId"`
	Groups        []struct {
		Name string `json:"name"`
		UUID string `json:"uuid"`
	} `json:"groups"`
	IsChinaRegion       bool   `json:"isChinaRegion"`
	IsGovCloud          bool   `json:"isGovCloud"`
	IsPortalConnector   bool   `json:"isPortalConnector"`
	LastSyncedOn        string `json:"lastSyncedOn"`
	Name                string `json:"name"`
	PortalConnectorUUID string `json:"portalConnectorUuid"`
	Provider            string `json:"provider"`
	State               string `json:"state"`
	ServiceError        string `json:"error`
	TotalAssets         int    `json:"totalAssets"`

	//Error response
	Timestamp     string `json:"timestamp"`
	Status        int    `json:"status"`
	ServiceEerror string `json:"error"`
	ErrorCode     string `json:"errorCode"`
	Message       string `json:"message"`
	Path          string `json:"path"`
}

Connector represents a qualys cloudview aws connector

type ConnectorList

type ConnectorList struct {
	List     []Connector `json:"content`
	Pageable *Pageable   `json:"pagable"`
	IsFirst  bool        `json:"first"`
	IsLast   bool        `json:"last"`
	Number   int         `json:"number"`
	Total    int         `json:"numberOfElements"`

	//Error response
	Timestamp     string `json:"timestamp"`
	Status        int    `json:"status"`
	ServiceEerror string `json:"error"`
	ErrorCode     string `json:"errorCode"`
	Message       string `json:"message"`
	Path          string `json:"path"`
}

ConnectorList represents a list of aws connectors

type ConnectorService

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

ConnectorService supports /cloudview-api/rest/v1/aws/connectors

func NewService

func NewService(baseURL, username, password string) *ConnectorService

NewService returns a new AWS ConnectorService

func (*ConnectorService) Create

func (s *ConnectorService) Create(opt *UpdataOptions) (*Connector, error)

Create creates a aws connector.

func (*ConnectorService) Delete

func (s *ConnectorService) Delete(opt *DeleteOptions) error

Delete deletes connectors by ids.

func (*ConnectorService) Get

func (s *ConnectorService) Get(id string) (*Connector, error)

Get gets a connector by id.

func (*ConnectorService) Update

func (s *ConnectorService) Update(id string, opt *UpdataOptions) error

Update updates a aws connector.

type CreateOptions

type CreateOptions struct {
	Arn               string `url:"arn" json:"arn"`
	Description       string `url:"description,omitempty" json:"description,omitempty"`
	ExternalID        string `url:"externalId" json:"externalId"`
	IsChinaRegion     bool   `url:"isChinaRegion" json:"isChinaRegion"`
	IsGovCloud        bool   `url:"isGovCloud" json:"isGovCloud"`
	IsPortalConnector bool   `url:"isPortalConnector" json:"isPortalConnector"`
	Name              string `url:"name" json:"name"`
}

CreateOptions options for create a aws connector

type DeleteOptions

type DeleteOptions struct {
	ConnectorIds []string `url:"connectorIds,omitempty" json:"connectorIds,omitempty"`
}

DeleteOptions options for delete aws connectors

type Pageable

type Pageable struct {
	Offset     int  `json:"offset"`
	PageNumber int  `json:"pageNumber"`
	PageSize   int  `json:"pageSize"`
	Paged      bool `json:"paged"`
	Sort       struct {
		Sorted   bool `json:"sorted"`
		Unsorted bool `json:"unsorted"`
	} `json:"sort"`
	UnPaged bool `json:"unpaged"`
}

Pageable represents pageable info of the api call

type UpdataOptions

type UpdataOptions struct {
	Arn               string `url:"arn,omitempty" json:"arn,omitempty"`
	Description       string `url:"description,omitempty" json:"description,omitempty"`
	ExternalID        string `url:"externalId,omitempty" json:"externalId,omitempty"`
	IsChinaRegion     bool   `url:"isChinaRegion,omitempty" json:"isChinaRegion,omitempty"`
	IsGovCloud        bool   `url:"isGovCloud,omitempty" json:"isGovCloud,omitempty"`
	IsPortalConnector bool   `url:"isPortalConnector,omitempty" json:"isPortalConnector,omitempty"`
	Name              string `url:"name,omitempty" json:"name,omitempty"`
}

UpdataOptions options for update a aws connector

Jump to

Keyboard shortcuts

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