gcp

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: 5 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 {
	ConnectorID string `json:"connectorId"`
	Description string `json:"description"`
	Groups      []struct {
		Name string `json:"name"`
		UUID string `json:"uuid"`
	} `json:"groups"`
	LastSyncedOn string `json:"lastSyncedOn"`
	Name         string `json:"name"`
	Project      string `json:"projectId"`
	Provider     string `json:"provider"`
	State        string `json:"state"`
	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 gcp 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 gcp connectors

type ConnectorService

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

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

func NewService

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

NewService returns a new GCP ConnectorService

func (*ConnectorService) Create

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

Create creates a gcp 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 gcp connector.

type CreateOptions

type CreateOptions struct {
	Name        string `url:"name" json:"name"`
	Description string `url:"description,omitempty" json:"description,omitempty"`
	ConfigFile  string `url:"-" json:"-"`
}

CreateOptions options for create a gcp connector

type DeleteOptions

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

DeleteOptions options for delete gcp 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 {
	Name        string `url:"name,omitempty" json:"name,omitempty"`
	Description string `url:"description,omitempty" json:"description,omitempty"`
	ConfigFile  string `url:"-" json:"-"`
}

UpdataOptions options for update a gcp connector

Jump to

Keyboard shortcuts

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