gcp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ApiPath = "/cloudview-api/rest/v1/gcp/connectors"

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	ErrorResponse

	ConnectorID  string  `json:"connectorId"`
	Description  string  `json:"description"`
	Groups       []Group `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"`
}

type ConnectorConfig

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

func NewConnectorConfig

func NewConnectorConfig() *ConnectorConfig

func (*ConnectorConfig) WithCredentialsJSON

func (c *ConnectorConfig) WithCredentialsJSON(file string) *ConnectorConfig

func (*ConnectorConfig) WithDescription

func (c *ConnectorConfig) WithDescription(desc string) *ConnectorConfig

func (*ConnectorConfig) WithName

func (c *ConnectorConfig) WithName(name string) *ConnectorConfig

func (*ConnectorConfig) WithProjectId

func (c *ConnectorConfig) WithProjectId(projectId string) *ConnectorConfig

type ConnectorIds

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

type ConnectorList

type ConnectorList struct {
	ErrorResponse

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

type ConnectorService

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

func NewService

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

func (*ConnectorService) Create

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

func (*ConnectorService) Delete

func (s *ConnectorService) Delete(connectorIds []string) error

func (*ConnectorService) Get

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

func (*ConnectorService) Update

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

type ErrorResponse

type ErrorResponse struct {
	Timestamp    string `json:"timestamp"`
	Status       int    `json:"status"`
	ServiceError string `json:"error"`
	ErrorCode    string `json:"errorCode"`
	Message      string `json:"message"`
	Path         string `json:"path"`
}

type Group

type Group struct {
	Name string `json:"name"`
	UUID string `json:"uuid"`
}

type Pageable

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

type Sort

type Sort struct {
	Sorted   bool `json:"sorted"`
	Unsorted bool `json:"unsorted"`
}

Jump to

Keyboard shortcuts

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