Documentation ¶
Index ¶
- Constants
- func CreateIAMServiceAccount(name string, iamRole string) (err error)
- func DownloadResource(url string, name string, resType string) error
- func FetchAsyncBundle(entityType string, name string, revision string, wg *sync.WaitGroup)
- func FetchBundle(entityType string, name string, revision string) error
- func GetApigeeEnv() string
- func GetApigeeOrg() string
- func GetApigeeToken() string
- func GetAsyncEntity(entityURL string, wg *sync.WaitGroup, mu *sync.Mutex)
- func GetEntityPayloadList() [][]byte
- func GetPrintOutput() bool
- func GetProjectID() string
- func GetServiceAccount() string
- func HttpClient(print bool, params ...string) (respBody []byte, err error)
- func ImportBundle(entityType string, name string, bundlePath string) error
- func ImportBundleAsync(entityType string, name string, bundlePath string, wg *sync.WaitGroup)
- func IsSkipCache() bool
- func IsSkipCheck() bool
- func IsSkipLogInfo() bool
- func NewApigeeClient(o ApigeeClientOptions)
- func PostHttpOctet(print bool, url string, proxyName string) (respBody []byte, err error)
- func PrettyPrint(body []byte) error
- func ReadBundle(filename string) error
- func RemoveIAMServiceAccount(serviceAccountName string, iamRole string) (err error)
- func SetAccessToken() error
- func SetApigeeEnv(env string)
- func SetApigeeOrg(org string)
- func SetApigeeToken(token string)
- func SetIAMServiceAccount(serviceAccountName string, iamRole string) (err error)
- func SetPrintOutput(output bool)
- func SetProjectID(projectID string)
- func SetServiceAccount(serviceAccount string)
- func SetSkipLogInfo(l bool)
- func WriteArrayByteArrayToFile(exportFile string, fileAppend bool, payload [][]byte) error
- func WriteByteArrayToFile(exportFile string, fileAppend bool, payload []byte) error
- type ApigeeClientOptions
Constants ¶
const BaseURL = "https://apigee.googleapis.com/v1/organizations/"
BaseURL is the Apigee control plane endpoint
const CrmURL = "https://cloudresourcemanager.googleapis.com/v1/projects/"
CrmURL is the endpoint for cloud resource manager
Variables ¶
This section is empty.
Functions ¶
func CreateIAMServiceAccount ¶
CreateIAMServiceAccount create a new IAM SA with the necessary roles for Apigee
func DownloadResource ¶
DownloadResource method is used to download resources, proxy bundles, sharedflows
func FetchAsyncBundle ¶
FetchAsyncBundle can download a shared flow or a proxy bundle
func FetchBundle ¶
FetchBundle can download a shared flow or proxy bundle
func GetApigeeToken ¶
func GetApigeeToken() string
GetApigeeToken get the access token value in client opts (does not generate it)
func GetAsyncEntity ¶
GetAsyncEntity stores results for each entity in a list
func GetEntityPayloadList ¶
func GetEntityPayloadList() [][]byte
func HttpClient ¶
HttpClient method is used to GET,POST,PUT or DELETE JSON data
func ImportBundle ¶
ImportBundle imports a sharedflow or api proxy bundle
func ImportBundleAsync ¶
ImportBundleAsync imports a sharedflow or api proxy bundle meantot be called asynchronously
func NewApigeeClient ¶
func NewApigeeClient(o ApigeeClientOptions)
NewApigeeClient sets up options to invoke Apigee APIs
func PostHttpOctet ¶
PostHttpOctet method is used to send resources, proxy bundles, shared flows etc.
func ReadBundle ¶
ReadBundle confirms if the file format is a zip file
func RemoveIAMServiceAccount ¶ added in v1.7.1
RemoveIAMServiceAccount removes/unbinds IAM SA from all roles for an Apigee Env
func SetAccessToken ¶
func SetAccessToken() error
SetAccessToken read from cache or if not found or expired will generate a new one
func SetApigeeToken ¶
func SetApigeeToken(token string)
SetApigeeToken sets the access token for use with Apigee API calls
func SetIAMServiceAccount ¶
SetIAMServiceAccount create a new IAM SA with the necessary roles for an Apigee Env
func WriteArrayByteArrayToFile ¶
WriteArrayByteArrayToFile accepts [][]bytes and writes to a file
Types ¶
type ApigeeClientOptions ¶
type ApigeeClientOptions struct { Org string //Apigee org Env string //Apigee environment 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 }
ApigeeClientOptions is the base struct to hold all command arguments