apiclient

package
v0.65.2-beta Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearEntityPayloadList

func ClearEntityPayloadList()

func CreateServiceAccount

func CreateServiceAccount(iamname string) (err error)

CreateServiceAccount

func DeletePreferencesFile

func DeletePreferencesFile() (err error)

func DownloadFile

func DownloadFile(url string, auth bool) (resp *http.Response, err error)

func DownloadResource

func DownloadResource(url string, name string, resType string) error

DownloadResource method is used to download resources, proxy bundles, sharedflows

func DryRun

func DryRun() bool

DryRun

func Every

func Every(duration time.Duration, work func(time.Time) bool) chan bool

func FolderExists

func FolderExists(folder string) (err error)

func GetBaseConnectorOperationsrURL

func GetBaseConnectorOperationsrURL() (connectorUrl string)

GetBaseConnectorOperationsURL

func GetBaseConnectorURL

func GetBaseConnectorURL() (connectorUrl string)

GetBaseConnectorURL

func GetBaseIntegrationURL

func GetBaseIntegrationURL() (integrationUrl string)

GetBaseIntegrationURL

func GetComputeEngineDefaultServiceAccount

func GetComputeEngineDefaultServiceAccount(projectId string) (serviceAccount string, err error)

GetDefaultServiceAccount

func GetDefaultProject

func GetDefaultProject() (org string)

func GetEntityPayloadList

func GetEntityPayloadList() [][]byte

func GetExportToFile

func GetExportToFile() string

GetExportToFile

func GetIntegrationRegions

func GetIntegrationRegions() []string

GetIntegrationRegions

func GetIntegrationToken

func GetIntegrationToken() string

GetIntegrationToken get the access token value in client opts (does not generate it)

func GetLastCheck

func GetLastCheck() (lastCheck string)

func GetNoCheck

func GetNoCheck() bool

func GetPreferences

func GetPreferences() (err error)

func GetPrintOutput

func GetPrintOutput() bool

GetPrintOutput

func GetProjectID

func GetProjectID() string

GetProjectID gets the project id

func GetProxyURL

func GetProxyURL() string

GetProxyURL

func GetRegion

func GetRegion() string

GetRegion gets the org variable

func GetServiceAccount

func GetServiceAccount() string

GetServiceAccount

func GetToken

func GetToken() (token string)

func HttpClient

func HttpClient(print bool, params ...string) (respBody []byte, err error)

HttpClient method is used to GET,POST,PUT or DELETE JSON data

func IsSkipCache

func IsSkipCache() bool

IsSkipCache

func IsSkipCheck

func IsSkipCheck() bool

IsSkipCheck

func IsSkipLogInfo

func IsSkipLogInfo() bool

IsSkipLogInfo

func NewIntegrationClient

func NewIntegrationClient(o IntegrationClientOptions)

NewIntegrationClient sets up options to invoke Integration APIs

func PostHttpOctet

func PostHttpOctet(print bool, update bool, url string, proxyName string) (respBody []byte, err error)

PostHttpOctet method is used to send resources, proxy bundles, shared flows etc.

func PostHttpZip

func PostHttpZip(print bool, auth bool, method string, url string, headers map[string]string, zipfile string) (err error)

PostHttpZip method is used to send resources, proxy bundles, shared flows etc.

func PrettifyJson

func PrettifyJson(body []byte) (prettyJson []byte, err error)

func PrettyPrint

func PrettyPrint(body []byte) error

PrettyPrint method prints formatted json

func ReadPreferencesFile

func ReadPreferencesFile() (err error)

func SetAccessToken

func SetAccessToken() error

SetAccessToken read from cache or if not found or expired will generate a new one

func SetBigQueryIAMPermission

func SetBigQueryIAMPermission(project string, datasetid string, memberName string) (err error)

SetBigQueryIAMPermission

func SetCloudSQLIAMPermission

func SetCloudSQLIAMPermission(project string, memberName string) (err error)

SetCloudSQLIAMPermission

func SetCloudStorageIAMPermission

func SetCloudStorageIAMPermission(project string, memberName string) (err error)

SetCloudStorageIAMPermission

func SetConnectorIAMPermission

func SetConnectorIAMPermission(name string, memberName string, iamRole string, memberType string) (err error)

SetConnectorIAMPermission set permissions for a member on a connection

func SetDefaultRegion

func SetDefaultRegion(region string) (err error)

func SetEntityPayloadList

func SetEntityPayloadList(respBody []byte)

func SetExportToFile

func SetExportToFile(exportToFile string)

SetExportToFile

func SetIntegrationToken

func SetIntegrationToken(token string)

SetIntegrationToken sets the access token for use with Integration API calls

func SetNoCheck

func SetNoCheck(nocheck bool) (err error)

func SetPrintOutput

func SetPrintOutput(output bool)

PrintOutput

func SetProjectID

func SetProjectID(projectID string) (err error)

SetProjectID sets the project id

func SetProxy

func SetProxy(url string) (err error)

func SetProxyURL

func SetProxyURL(proxyurl string)

SetProxyURL

func SetPubSubIAMPermission

func SetPubSubIAMPermission(project string, topic string, memberName string) (err error)

SetPubSubIAMPermission set permissions for a SA on a topic

func SetRegion

func SetRegion(region string) (err error)

SetRegion sets the org variable

func SetSecretManagerIAMPermission

func SetSecretManagerIAMPermission(project string, secretName string, memberName string) (err error)

SetSecretManagerIAMPermission set permissions for a SA on a secret

func SetServiceAccount

func SetServiceAccount(serviceAccount string)

SetServiceAccount

func SetSkipLogInfo

func SetSkipLogInfo(l bool)

SetSkipLogIngo

func SetUseApigee

func SetUseApigee(useapigee bool) (err error)

func TestAndUpdateLastCheck

func TestAndUpdateLastCheck() (updated bool, err error)

func UseApigeeIntegration

func UseApigeeIntegration()

func WriteArrayByteArrayToFile

func WriteArrayByteArrayToFile(exportFile string, fileAppend bool, payload [][]byte) error

WriteArrayByteArrayToFile accepts [][]bytes and writes to a file

func WriteByteArrayToFile

func WriteByteArrayToFile(exportFile string, fileAppend bool, payload []byte) error

WriteByteArrayToFile accepts []bytes and writes to a file

func WriteDefaultProject

func WriteDefaultProject(project string) (err error)

func WritePerferencesFile

func WritePerferencesFile(payload []byte) (err error)

WritePreferencesFile

func WriteToken

func WriteToken(token string) (err error)

Types

type IntegrationClientOptions

type IntegrationClientOptions struct {
	Region               string //Integration region
	Token                string //Google OAuth access token
	ServiceAccount       string //Google service account json
	ProjectID            string //GCP Project ID
	SkipLogInfo          bool   //LogInfo controls the log level
	SkipCheck            bool   //skip checking access token expiry
	SkipCache            bool   //skip writing access token to file
	PrintOutput          bool   //prints output from http calls
	ProxyUrl             string //use a proxy url
	ExportToFile         string //determine of the contents should be written to file
	UseApigeeIntegration bool   //use Apigee Integration; defaults to Application Integration
	NoOutput             bool   //disables printing API responses
}

IntegrationClientOptions is the base struct to hold all command arguments

Jump to

Keyboard shortcuts

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