Documentation ¶
Overview ¶
Package apigee provides a client for administering Apigee Edge.
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Int(v int) *int
- func StreamToString(stream io.Reader) string
- func String(v string) *string
- type App
- type Attribute
- type Company
- type CompanyApp
- type CompanyAppCredential
- type CompanyAppCredentialService
- type CompanyAppCredentialServiceOp
- func (s *CompanyAppCredentialServiceOp) Create(companyName string, appName string, companyAppCredential CompanyAppCredential) (*Credential, *Response, error)
- func (s *CompanyAppCredentialServiceOp) Delete(companyName string, appName string, consumerKey string) (*Response, error)
- func (s *CompanyAppCredentialServiceOp) Get(companyName string, appName string, consumerKey string) (*Credential, *Response, error)
- func (s *CompanyAppCredentialServiceOp) RemoveApiProduct(companyName string, appName string, consumerKey string, apiProductName string) (*Response, error)
- func (s *CompanyAppCredentialServiceOp) Update(companyName string, appName string, consumerKey string, ...) (*Credential, *Response, error)
- type CompanyAppService
- type CompanyAppServiceOp
- func (s *CompanyAppServiceOp) Create(companyName string, companyApp CompanyApp) (*CompanyApp, *Response, error)
- func (s *CompanyAppServiceOp) Delete(companyName string, name string) (*Response, error)
- func (s *CompanyAppServiceOp) Get(companyName string, name string) (*CompanyApp, *Response, error)
- func (s *CompanyAppServiceOp) Update(companyName string, companyApp CompanyApp) (*CompanyApp, *Response, error)
- type CompanyService
- type CompanyServiceOp
- type Credential
- type CredentialApiProduct
- type DeletedProxyInfo
- type DeletedSharedFlowInfo
- type Developer
- type DeveloperApp
- type DeveloperAppService
- type DeveloperAppServiceOp
- func (s *DeveloperAppServiceOp) Create(email string, developerApp DeveloperApp) (*DeveloperApp, *Response, error)
- func (s *DeveloperAppServiceOp) Delete(email string, name string) (*Response, error)
- func (s *DeveloperAppServiceOp) Get(email string, name string) (*DeveloperApp, *Response, error)
- func (s *DeveloperAppServiceOp) Update(email string, developerApp DeveloperApp) (*DeveloperApp, *Response, error)
- type DeveloperService
- type DeveloperServiceOp
- func (s *DeveloperServiceOp) Create(developer Developer) (*Developer, *Response, error)
- func (s *DeveloperServiceOp) Delete(email string) (*Response, error)
- func (s *DeveloperServiceOp) Get(email string) (*Developer, *Response, error)
- func (s *DeveloperServiceOp) Update(developer Developer) (*Developer, *Response, error)
- type EdgeAuth
- type EdgeClient
- type EdgeClientOptions
- type EdgeServer
- type EntryStruct
- type EnvironmentDeployment
- type ErrorResponse
- type KeyValueMap
- type KeyValueMapEntry
- type KeyValueMapEntryKeys
- type KeyValueMapEntryService
- type KeyValueMapEntryServiceOp
- func (s *KeyValueMapEntryServiceOp) Create(keyValueMapName string, keyValueMapEntry KeyValueMapEntryKeys, env string) (*KeyValueMapEntry, *Response, error)
- func (s *KeyValueMapEntryServiceOp) Delete(keyValueMapEntry string, keyValueMapName string, env string) (*Response, error)
- func (s *KeyValueMapEntryServiceOp) Get(keyValueMapName string, env string, keyValueMapEntry string) (*KeyValueMapEntry, *Response, error)
- func (s *KeyValueMapEntryServiceOp) Update(keyValueMapName string, keyValueMapEntry KeyValueMapEntryKeys, env string) (*KeyValueMapEntry, *Response, error)
- type KeyValueMapService
- type KeyValueMapServiceOp
- type ListOptions
- type Product
- type ProductsService
- type ProductsServiceOp
- func (s *ProductsServiceOp) Create(product Product) (*Product, *Response, error)
- func (s *ProductsServiceOp) Delete(name string) (*Response, error)
- func (s *ProductsServiceOp) Get(name string) (*Product, *Response, error)
- func (s *ProductsServiceOp) Update(product Product) (*Product, *Response, error)
- type ProxiesService
- type ProxiesServiceOp
- func (s *ProxiesServiceOp) Delete(proxyName string) (*DeletedProxyInfo, *Response, error)
- func (s *ProxiesServiceOp) DeleteRevision(proxyName string, rev Revision) (*ProxyRevision, *Response, error)
- func (s *ProxiesServiceOp) Deploy(proxyName, env string, rev Revision, delay int, override bool) (*ProxyRevisionDeployment, *Response, error)
- func (s *ProxiesServiceOp) Export(proxyName string, rev Revision) (string, *Response, error)
- func (s *ProxiesServiceOp) Get(proxy string) (*Proxy, *Response, error)
- func (s *ProxiesServiceOp) GetDeployments(proxy string) (*ProxyDeployment, *Response, error)
- func (s *ProxiesServiceOp) Import(proxyName string, source string) (*ProxyRevision, *Response, error)
- func (s *ProxiesServiceOp) List() ([]string, *Response, error)
- func (s *ProxiesServiceOp) ReDeploy(proxyName, env string, rev Revision, delay int, override bool) (*ProxyRevisionDeployments, *Response, error)
- func (s *ProxiesServiceOp) Undeploy(proxyName, env string, rev Revision) (*ProxyRevisionDeployment, *Response, error)
- func (s *ProxiesServiceOp) Update(proxyName string, rev string, source string) (*ProxyRevisionUpdate, *Response, error)
- type Proxy
- type ProxyDeployment
- type ProxyMetadata
- type ProxyRevision
- type ProxyRevisionDeployment
- type ProxyRevisionDeployments
- type ProxyRevisionUpdate
- type RequestCompletionCallback
- type Response
- type Revision
- type RevisionDeployment
- type SSLInfo
- type SharedFlow
- type SharedFlowDeployment
- type SharedFlowMetadata
- type SharedFlowRevision
- type SharedFlowRevisionDeployment
- type SharedFlowRevisionDeployments
- type SharedFlowService
- type SharedFlowServiceOp
- func (s *SharedFlowServiceOp) Delete(name string) (*DeletedSharedFlowInfo, *Response, error)
- func (s *SharedFlowServiceOp) Deploy(name, env string, rev Revision, delay int, override bool) (*SharedFlowRevisionDeployment, *Response, error)
- func (s *SharedFlowServiceOp) Get(name string) (*SharedFlow, *Response, error)
- func (s *SharedFlowServiceOp) GetDeployments(name string) (*SharedFlowDeployment, *Response, error)
- func (s *SharedFlowServiceOp) Import(name string, source string) (*SharedFlowRevision, *Response, error)
- func (s *SharedFlowServiceOp) List() ([]string, *Response, error)
- func (s *SharedFlowServiceOp) ReDeploy(sharedFlowName, env string, rev Revision, delay int, override bool) (*SharedFlowRevisionDeployments, *Response, error)
- func (s *SharedFlowServiceOp) Undeploy(sharedFlowName, env string, rev Revision) (*SharedFlowRevisionDeployment, *Response, error)
- type TargetServer
- type TargetServersService
- type TargetServersServiceOp
- func (s *TargetServersServiceOp) Create(targetServer TargetServer, env string) (*TargetServer, *Response, error)
- func (s *TargetServersServiceOp) Delete(name string, env string) (*Response, error)
- func (s *TargetServersServiceOp) Get(name string, env string) (*TargetServer, *Response, error)
- func (s *TargetServersServiceOp) Update(targetServer TargetServer, env string) (*TargetServer, *Response, error)
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.
func Int ¶
Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.
func StreamToString ¶
StreamToString converts a reader to a string
Types ¶
type CompanyApp ¶
type CompanyApp struct { Name string `json:"name,omitempty"` ApiProducts []string `json:"apiProducts,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` Scopes []string `json:"scopes,omitempty"` CallbackUrl string `json:"callbackUrl,omitempty"` Credentials []Credential `json:"credentials,omitempty"` AppId string `json:"appId,omitempty"` CompanyName string `json:"companyName,omitempty"` AppFamily string `json:"appFamily,omitempty"` Status string `json:"status,omitempty"` }
type CompanyAppCredential ¶
type CompanyAppCredential struct { ConsumerKey string `json:"consumerKey,omitempty"` ConsumerSecret string `json:"consumerSecret,omitempty"` ApiProducts []string `json:"apiProducts,omitempty"` ExpiresAt int `json:"expiresAt,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` Scopes []string `json:"scopes,omitempty"` }
type CompanyAppCredentialService ¶
type CompanyAppCredentialService interface { Create(string, string, CompanyAppCredential) (*Credential, *Response, error) Update(string, string, string, CompanyAppCredential) (*Credential, *Response, error) Get(string, string, string) (*Credential, *Response, error) Delete(string, string, string) (*Response, error) RemoveApiProduct(string, string, string, string) (*Response, error) }
CompanyAppCredentialService is an interface for interfacing with the Apigee Edge Admin API dealing with companyApp credentials/keys.
type CompanyAppCredentialServiceOp ¶
type CompanyAppCredentialServiceOp struct {
// contains filtered or unexported fields
}
func (*CompanyAppCredentialServiceOp) Create ¶
func (s *CompanyAppCredentialServiceOp) Create(companyName string, appName string, companyAppCredential CompanyAppCredential) (*Credential, *Response, error)
Create a company app's consumer key and secret
func (*CompanyAppCredentialServiceOp) Delete ¶
func (s *CompanyAppCredentialServiceOp) Delete(companyName string, appName string, consumerKey string) (*Response, error)
Delete a company app's consumer key
func (*CompanyAppCredentialServiceOp) Get ¶
func (s *CompanyAppCredentialServiceOp) Get(companyName string, appName string, consumerKey string) (*Credential, *Response, error)
Get information about a company app's consumer key
func (*CompanyAppCredentialServiceOp) RemoveApiProduct ¶
func (s *CompanyAppCredentialServiceOp) RemoveApiProduct(companyName string, appName string, consumerKey string, apiProductName string) (*Response, error)
Remove an API product from a company app's consumer key
func (*CompanyAppCredentialServiceOp) Update ¶
func (s *CompanyAppCredentialServiceOp) Update(companyName string, appName string, consumerKey string, companyAppCredential CompanyAppCredential) (*Credential, *Response, error)
Update existing company app's consumer key with new API products or attributes
type CompanyAppService ¶
type CompanyAppService interface { Get(string, string) (*CompanyApp, *Response, error) Create(string, CompanyApp) (*CompanyApp, *Response, error) Delete(string, string) (*Response, error) Update(string, CompanyApp) (*CompanyApp, *Response, error) }
CompanyAppService is an interface for interfacing with the Apigee Edge Admin API dealing with companyApps.
type CompanyAppServiceOp ¶
type CompanyAppServiceOp struct {
// contains filtered or unexported fields
}
func (*CompanyAppServiceOp) Create ¶
func (s *CompanyAppServiceOp) Create(companyName string, companyApp CompanyApp) (*CompanyApp, *Response, error)
func (*CompanyAppServiceOp) Delete ¶
func (s *CompanyAppServiceOp) Delete(companyName string, name string) (*Response, error)
func (*CompanyAppServiceOp) Get ¶
func (s *CompanyAppServiceOp) Get(companyName string, name string) (*CompanyApp, *Response, error)
func (*CompanyAppServiceOp) Update ¶
func (s *CompanyAppServiceOp) Update(companyName string, companyApp CompanyApp) (*CompanyApp, *Response, error)
type CompanyService ¶
type CompanyService interface { Get(string) (*Company, *Response, error) Create(Company) (*Company, *Response, error) Delete(string) (*Response, error) Update(Company) (*Company, *Response, error) }
CompanyService is an interface for interfacing with the Apigee Edge Admin API dealing with companys.
type CompanyServiceOp ¶
type CompanyServiceOp struct {
// contains filtered or unexported fields
}
func (*CompanyServiceOp) Create ¶
func (s *CompanyServiceOp) Create(company Company) (*Company, *Response, error)
type Credential ¶
type Credential struct { ApiProducts []CredentialApiProduct `json:"apiProducts,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` ConsumerKey string `json:"consumerKey,omitempty"` ConsumerSecret string `json:"consumerSecret,omitempty"` ExpiresAt int `json:"expiresAt,omitempty"` IssuedAt int `json:"issuedAt,omitempty"` Scopes []string `json:"scopes,omitempty"` Status string `json:"status,omitempty"` }
type CredentialApiProduct ¶
type DeletedProxyInfo ¶
type DeletedProxyInfo struct {
Name string `json:"name,omitempty"`
}
When Delete returns successfully, it returns a payload that contains very little useful information. This struct deserializes that information.
type DeletedSharedFlowInfo ¶
type DeletedSharedFlowInfo struct {
}DeletedSharedFlowInfo is a payload that contains very little useful information. This struct deserializes that information.
type Developer ¶
type Developer struct { Email string `json:"email,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` UserName string `json:"userName,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` DeveloperId string `json:"developerId,omitempty"` Apps []string `json:"apps,omitempty"` Status string `json:"status,omitempty"` }
type DeveloperApp ¶
type DeveloperApp struct { Name string `json:"name,omitempty"` ApiProducts []string `json:"apiProducts,omitempty"` KeyExpiresIn int `json:"keyExpiresIn,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` Scopes []string `json:"scopes,omitempty"` CallbackUrl string `json:"callbackUrl,omitempty"` Credentials []Credential `json:"credentials,omitempty"` AppId string `json:"appId,omitempty"` DeveloperId string `json:"developerId,omitempty"` AppFamily string `json:"appFamily,omitempty"` Status string `json:"status,omitempty"` }
type DeveloperAppService ¶
type DeveloperAppService interface { Get(string, string) (*DeveloperApp, *Response, error) Create(string, DeveloperApp) (*DeveloperApp, *Response, error) Delete(string, string) (*Response, error) Update(string, DeveloperApp) (*DeveloperApp, *Response, error) }
DeveloperAppService is an interface for interfacing with the Apigee Edge Admin API dealing with developerApps.
type DeveloperAppServiceOp ¶
type DeveloperAppServiceOp struct {
// contains filtered or unexported fields
}
func (*DeveloperAppServiceOp) Create ¶
func (s *DeveloperAppServiceOp) Create(email string, developerApp DeveloperApp) (*DeveloperApp, *Response, error)
func (*DeveloperAppServiceOp) Delete ¶
func (s *DeveloperAppServiceOp) Delete(email string, name string) (*Response, error)
func (*DeveloperAppServiceOp) Get ¶
func (s *DeveloperAppServiceOp) Get(email string, name string) (*DeveloperApp, *Response, error)
func (*DeveloperAppServiceOp) Update ¶
func (s *DeveloperAppServiceOp) Update(email string, developerApp DeveloperApp) (*DeveloperApp, *Response, error)
type DeveloperService ¶
type DeveloperService interface { Get(string) (*Developer, *Response, error) Create(Developer) (*Developer, *Response, error) Delete(string) (*Response, error) Update(Developer) (*Developer, *Response, error) }
DeveloperService is an interface for interfacing with the Apigee Edge Admin API dealing with developers.
type DeveloperServiceOp ¶
type DeveloperServiceOp struct {
// contains filtered or unexported fields
}
func (*DeveloperServiceOp) Create ¶
func (s *DeveloperServiceOp) Create(developer Developer) (*Developer, *Response, error)
func (*DeveloperServiceOp) Delete ¶
func (s *DeveloperServiceOp) Delete(email string) (*Response, error)
type EdgeAuth ¶
type EdgeAuth struct { // Optional. The path to the .netrc file that holds credentials for the Edge Management server. // By default, this is ${HOME}/.netrc . If you specify a Password, this option is ignored. NetrcPath string // Optional. The username to use when authenticating to the Edge Management server. // Ignored if you specify a NetrcPath. Username string // Optional. Used if you explicitly specify a Password. Password string // Optional. Access token used for OAuth AccessToken string }
EdgeAuth holds information about how to authenticate to the Edge Management server.
type EdgeClient ¶
type EdgeClient struct { // Base URL for API requests. BaseURL *url.URL // User agent for client UserAgent string // Services used for communicating with the API Proxies ProxiesService TargetServers TargetServersService Products ProductsService Developers DeveloperService Companies CompanyService CompanyApps CompanyAppService CompanyAppCredentials CompanyAppCredentialService DeveloperApps DeveloperAppService // Account AccountService // Actions ActionsService // Domains DomainsService // DropletActions DropletActionsService // Images ImagesService // ImageActions ImageActionsService KeyValueMap KeyValueMapService KeyValueMapEntry KeyValueMapEntryService // contains filtered or unexported fields }
EdgeClient manages communication with Apigee Edge V1 Admin API.
func NewEdgeClient ¶
func NewEdgeClient(o *EdgeClientOptions) (*EdgeClient, error)
NewEdgeClient returns a new EdgeClient.
func (*EdgeClient) Do ¶
func (c *EdgeClient) Do(req *http.Request, v interface{}) (*Response, error)
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.
func (*EdgeClient) NewRequest ¶
func (c *EdgeClient) NewRequest(method, urlStr string, body interface{}, contentTypeOverride string) (*http.Request, error)
NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.
func (*EdgeClient) OnRequestCompleted ¶
func (c *EdgeClient) OnRequestCompleted(rc RequestCompletionCallback)
sets the request completion callback for the API
type EdgeClientOptions ¶
type EdgeClientOptions struct { // Optional. The Admin base URL. For example, if using OPDK this might be // http://192.168.10.56:8080 . It defaults to https://api.enterprise.apigee.com MgmtUrl string // Specify the Edge organization name. Org string // Required. Authentication information for the Edge Management server. Auth *EdgeAuth // Optional. Warning: if set to true, HTTP Basic Auth base64 blobs will appear in output. Debug bool // contains filtered or unexported fields }
type EdgeServer ¶
type EdgeServer struct { Status string `json:"status,omitempty"` Uuid string `json:"uUID,omitempty"` Type []string `json:"type,omitempty"` }
When inquiring the deployment status of an API PRoxy revision, even implicitly as when performing a Deploy or Undeploy, the response includes the deployment status for each particular Edge Server in the environment. This struct deserializes that information. It will normally not be useful at all. In rare cases, it may be useful in helping to diagnose problems. For example, if there is a problem with a deployment change, as when a Message Processor is experiencing a problem and cannot undeploy, or more commonly, cannot deploy an API Proxy, this struct will hold relevant information.
type EntryStruct ¶
type EntryStruct struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` }
EntryStruct Holds the Key value map entry
type EnvironmentDeployment ¶
type EnvironmentDeployment struct { Name string `json:"name,omitempty"` Revision []RevisionDeployment `json:"revision,omitempty"` }
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response // Error message - maybe the json for this is "fault" Message string `json:"message"` }
An ErrorResponse reports the error caused by an API request
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type KeyValueMap ¶
type KeyValueMap struct { Name string `json:"name,omitempty"` Encrypted bool `json:"encrypted,omitempty"` Entry []EntryStruct `json:"entry,omitempty"` }
KeyValueMap Holds the Key value map
type KeyValueMapEntry ¶
type KeyValueMapEntry struct { KVMName string `json:"kvmName,omitempty"` Entry []KeyValueMapEntryKeys `json:"entry,omitempty"` }
KeyValueMapEntry Holds the Key value map
type KeyValueMapEntryKeys ¶
type KeyValueMapEntryKeys struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` }
KeyValueMapEntryKeys to update
type KeyValueMapEntryService ¶
type KeyValueMapEntryService interface { Get(string, string, string) (*KeyValueMapEntry, *Response, error) Create(string, KeyValueMapEntryKeys, string) (*KeyValueMapEntry, *Response, error) Delete(string, string, string) (*Response, error) Update(string, KeyValueMapEntryKeys, string) (*KeyValueMapEntry, *Response, error) }
KeyValueMapEntryService is an interface for interfacing with the Apigee Edge Admin API dealing with KeyValueMapEntry.
type KeyValueMapEntryServiceOp ¶
type KeyValueMapEntryServiceOp struct {
// contains filtered or unexported fields
}
KeyValueMapEntryServiceOp holds creds
func (*KeyValueMapEntryServiceOp) Create ¶
func (s *KeyValueMapEntryServiceOp) Create(keyValueMapName string, keyValueMapEntry KeyValueMapEntryKeys, env string) (*KeyValueMapEntry, *Response, error)
Create a new key value map entry
func (*KeyValueMapEntryServiceOp) Delete ¶
func (s *KeyValueMapEntryServiceOp) Delete(keyValueMapEntry string, keyValueMapName string, env string) (*Response, error)
Delete an existing key value map entry
func (*KeyValueMapEntryServiceOp) Get ¶
func (s *KeyValueMapEntryServiceOp) Get(keyValueMapName string, env string, keyValueMapEntry string) (*KeyValueMapEntry, *Response, error)
Get the key value map entry
func (*KeyValueMapEntryServiceOp) Update ¶
func (s *KeyValueMapEntryServiceOp) Update(keyValueMapName string, keyValueMapEntry KeyValueMapEntryKeys, env string) (*KeyValueMapEntry, *Response, error)
Update an existing key value map entry
type KeyValueMapService ¶
type KeyValueMapService interface { Get(string, string) (*KeyValueMap, *Response, error) Create(KeyValueMap, string) (*KeyValueMap, *Response, error) Delete(string, string) (*Response, error) }
KeyValueMapService is an interface for interfacing with the Apigee Edge Admin API dealing with KeyValueMap.
type KeyValueMapServiceOp ¶
type KeyValueMapServiceOp struct {
// contains filtered or unexported fields
}
KeyValueMapServiceOp holds creds
func (*KeyValueMapServiceOp) Create ¶
func (s *KeyValueMapServiceOp) Create(keyValueMap KeyValueMap, env string) (*KeyValueMap, *Response, error)
Create a new key value map
func (*KeyValueMapServiceOp) Delete ¶
func (s *KeyValueMapServiceOp) Delete(name string, env string) (*Response, error)
Delete an existing key value map
func (*KeyValueMapServiceOp) Get ¶
func (s *KeyValueMapServiceOp) Get(name string, env string) (*KeyValueMap, *Response, error)
Get the Keyvaluemap
type ListOptions ¶
type ListOptions struct { // to ask for expanded results Expand bool `url:"expand"` }
ListOptions holds optional parameters to various List methods
type Product ¶
type Product struct { Name string `json:"name,omitempty"` DisplayName string `json:"displayName,omitempty"` ApprovalType string `json:"approvalType,omitempty"` //manual or auto Attributes []Attribute `json:"attributes,omitempty"` Description string `json:"description,omitempty"` ApiResources []string `json:"apiResources,omitempty"` Proxies []string `json:"proxies,omitempty"` Quota string `json:"quota,omitempty"` QuotaInterval string `json:"quotaInterval,omitempty"` QuotaTimeUnit string `json:"quotaTimeUnit,omitempty"` Scopes []string `json:"scopes,omitempty"` Environments []string `json:"environments,omitempty"` }
type ProductsService ¶
type ProductsService interface { Get(string) (*Product, *Response, error) Create(Product) (*Product, *Response, error) Delete(string) (*Response, error) Update(Product) (*Product, *Response, error) }
ProductsService is an interface for interfacing with the Apigee Edge Admin API dealing with apiproducts.
type ProductsServiceOp ¶
type ProductsServiceOp struct {
// contains filtered or unexported fields
}
func (*ProductsServiceOp) Create ¶
func (s *ProductsServiceOp) Create(product Product) (*Product, *Response, error)
func (*ProductsServiceOp) Delete ¶
func (s *ProductsServiceOp) Delete(name string) (*Response, error)
type ProxiesService ¶
type ProxiesService interface { List() ([]string, *Response, error) Get(string) (*Proxy, *Response, error) Import(string, string) (*ProxyRevision, *Response, error) Update(string, string, string) (*ProxyRevisionUpdate, *Response, error) Delete(string) (*DeletedProxyInfo, *Response, error) DeleteRevision(string, Revision) (*ProxyRevision, *Response, error) Deploy(string, string, Revision, int, bool) (*ProxyRevisionDeployment, *Response, error) ReDeploy(string, string, Revision, int, bool) (*ProxyRevisionDeployments, *Response, error) Undeploy(string, string, Revision) (*ProxyRevisionDeployment, *Response, error) Export(string, Revision) (string, *Response, error) GetDeployments(string) (*ProxyDeployment, *Response, error) }
ProxiesService is an interface for interfacing with the Apigee Edge Admin API dealing with apiproxies.
type ProxiesServiceOp ¶
type ProxiesServiceOp struct {
// contains filtered or unexported fields
}
func (*ProxiesServiceOp) Delete ¶
func (s *ProxiesServiceOp) Delete(proxyName string) (*DeletedProxyInfo, *Response, error)
Delete an API Proxy and all its revisions from an organization. This method will fail if any of the revisions of the named API Proxy are currently deployed in any environment.
func (*ProxiesServiceOp) DeleteRevision ¶
func (s *ProxiesServiceOp) DeleteRevision(proxyName string, rev Revision) (*ProxyRevision, *Response, error)
DeleteRevision deletes a specific revision of an API Proxy from an organization. The revision must exist, and must not be currently deployed.
func (*ProxiesServiceOp) Deploy ¶
func (s *ProxiesServiceOp) Deploy(proxyName, env string, rev Revision, delay int, override bool) (*ProxyRevisionDeployment, *Response, error)
Deploy a revision of an API proxy to a specific environment within an organization.
func (*ProxiesServiceOp) Export ¶
Export a revision of an API proxy within an organization, to a filesystem file.
func (*ProxiesServiceOp) Get ¶
func (s *ProxiesServiceOp) Get(proxy string) (*Proxy, *Response, error)
Get retrieves the information about an API Proxy in an organization, information including the list of available revisions, and the created and last modified dates and actors.
func (*ProxiesServiceOp) GetDeployments ¶
func (s *ProxiesServiceOp) GetDeployments(proxy string) (*ProxyDeployment, *Response, error)
GetDeployments retrieves the information about deployments of an API Proxy in an organization, including the environment names and revision numbers.
func (*ProxiesServiceOp) Import ¶
func (s *ProxiesServiceOp) Import(proxyName string, source string) (*ProxyRevision, *Response, error)
Import an API proxy into an organization, creating a new API Proxy revision. The proxyName can be passed as "nil" in which case the name is derived from the source. The source can be either a filesystem directory containing an exploded apiproxy bundle, OR the path of a zip file containing an API Proxy bundle. Returns the API proxy revision information. This method does not deploy the imported proxy. See the Deploy method.
func (*ProxiesServiceOp) List ¶
func (s *ProxiesServiceOp) List() ([]string, *Response, error)
List retrieves the list of apiproxy names for the organization referred by the EdgeClient.
func (*ProxiesServiceOp) ReDeploy ¶
func (s *ProxiesServiceOp) ReDeploy(proxyName, env string, rev Revision, delay int, override bool) (*ProxyRevisionDeployments, *Response, error)
isn't is nice that the return data structure changes on the second revision deployment?! NO!
func (*ProxiesServiceOp) Undeploy ¶
func (s *ProxiesServiceOp) Undeploy(proxyName, env string, rev Revision) (*ProxyRevisionDeployment, *Response, error)
Undeploy a specific revision of an API Proxy from a particular environment within an Edge organization.
func (*ProxiesServiceOp) Update ¶
func (s *ProxiesServiceOp) Update(proxyName string, rev string, source string) (*ProxyRevisionUpdate, *Response, error)
Update an API proxy revision that already exists. The source can be either a filesystem directory containing an exploded apiproxy bundle, OR the path of a zip file containing an API Proxy bundle. Returns the API proxy revision.
type Proxy ¶
type Proxy struct { Revisions []Revision `json:"revision,omitempty"` Name string `json:"name,omitempty"` MetaData ProxyMetadata `json:"metaData,omitempty"` }
Proxy contains information about an API Proxy within an Edge organization.
type ProxyDeployment ¶
type ProxyDeployment struct { Environments []EnvironmentDeployment `json:"environment,omitempty"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` }
ProxyDeployment holds information about the deployment state of a all revisions of an API Proxy.
type ProxyMetadata ¶
type ProxyMetadata struct { LastModifiedBy string `json:"lastModifiedBy,omitempty"` CreatedBy string `json:"createdBy,omitempty"` LastModifiedAt Timestamp `json:"lastModifiedAt,omitempty"` CreatedAt Timestamp `json:"createdAt,omitempty"` }
ProxyMetadata contains information related to the creation and last modified time and actor for an API Proxy within an organization.
type ProxyRevision ¶
type ProxyRevision struct { CreatedBy string `json:"createdBy,omitempty"` CreatedAt Timestamp `json:"createdAt,omitempty"` Description string `json:"description,omitempty"` ContextInfo string `json:"contextInfo,omitempty"` DisplayName string `json:"displayName,omitempty"` Name string `json:"name,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` LastModifiedAt Timestamp `json:"lastModifiedAt,omitempty"` Revision Revision `json:"revision,omitempty"` TargetEndpoints []string `json:"targetEndpoints,omitempty"` TargetServers []string `json:"targetServers,omitempty"` Resources []string `json:"resources,omitempty"` ProxyEndpoints []string `json:"proxyEndpoints,omitempty"` Policies []string `json:"policies,omitempty"` Type string `json:"type,omitempty"` }
ProxyRevision holds information about a revision of an API Proxy.
type ProxyRevisionDeployment ¶
type ProxyRevisionDeployment struct { Name string `json:"aPIProxy,omitempty"` Revision Revision `json:"revision,omitempty"` Environment string `json:"environment,omitempty"` Organization string `json:"organization,omitempty"` State string `json:"state,omitempty"` Servers []EdgeServer `json:"server,omitempty"` }
ProxyRevisionDeployment holds information about the deployment state of a single revision of an API Proxy.
type ProxyRevisionDeployments ¶
type ProxyRevisionDeployments struct { Name string `json:"aPIProxy,omitempty"` Environments []ProxyRevisionDeployment `json:"environment,omitempty"` Organization string `json:"organization,omitempty"` }
ProxyRevisionDeployment holds information about the deployment state of a single revision of an API Proxy.
type ProxyRevisionUpdate ¶
type ProxyRevisionUpdate struct {
Revision Revision `json:"revision,omitempty"`
}
ProxyRevisionUpdate only returns the updated revision.
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function
type Revision ¶
type Revision int
Revision represents a revision number. Edge returns rev numbers in string form. This marshals and unmarshals between that format and int.
func (*Revision) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface. It marshals from a Revision holding an integer value like 2, into a string like "2".
func (*Revision) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. It unmarshals from a string like "2" (including the quotes), into an integer 2.
type RevisionDeployment ¶
type RevisionDeployment struct { Number Revision `json:"name,omitempty"` State string `json:"state,omitempty"` Servers []EdgeServer `json:"server,omitempty"` }
type SSLInfo ¶
type SSLInfo struct { SSLEnabled string `json:"enabled,omitempty"` ClientAuthEnabled string `json:"clientAuthEnabled,omitempty"` KeyStore string `json:"keyStore,omitempty"` TrustStore string `json:"trustStore,omitempty"` KeyAlias string `json:"keyAlias,omitempty"` Ciphers []string `json:"ciphers,omitempty"` IgnoreValidationErrors bool `json:"ignoreValidationErrors"` Protocols []string `json:"protocols,omitempty"` }
For some reason Apigee returns SOME bools as strings and others a bools.
type SharedFlow ¶
type SharedFlow struct {}
type SharedFlowDeployment ¶
type SharedFlowDeployment struct {}
SharedFlowDeployment holds information about the deployment state of all revisions of a shared flow
type SharedFlowMetadata ¶
type SharedFlowMetadata struct {}
SharedFlowMetadata contains information related to the creation and last modified time and actor for a shared flow within an organization.
type SharedFlowRevision ¶
type SharedFlowRevision struct {}
SharedFlowRevision holds information about a revision of a shared flow.
type SharedFlowRevisionDeployment ¶
type SharedFlowRevisionDeployment struct {}
SharedFlowRevisionDeployment holds information about the deployment state of a single revision of a shared flow.
type SharedFlowRevisionDeployments ¶
type SharedFlowRevisionDeployments struct {}
SharedFlowRevisionDeployments holds information about the deployment state of a single revision of a shared flow across environments
type SharedFlowService ¶
type SharedFlowService interface {}
SharedFlowService is an interface for interfacing with the Apigee Edge Admin API dealing with shardFlows.
type SharedFlowServiceOp ¶
type SharedFlowServiceOp struct {
// contains filtered or unexported fields
}
func (*SharedFlowServiceOp) Delete ¶
func (s *SharedFlowServiceOp) Delete(name string) (*DeletedSharedFlowInfo, *Response, error)
Delete an SharedFlow and all its revisions from an organization. This method will fail if any of the revisions of the named shared flow are currently deployed in any environment.
func (*SharedFlowServiceOp) Deploy ¶
func (s *SharedFlowServiceOp) Deploy(name, env string, rev Revision, delay int, override bool) (*SharedFlowRevisionDeployment, *Response, error)
Deploy a revision of a ShareFlow to a specific environment within an organization.
func (*SharedFlowServiceOp) Get ¶
func (s *SharedFlowServiceOp) Get(name string) (*SharedFlow, *Response, error)
Get retrieves the information about a SharedFlow in an organization, information including the list of available revisions, and the created and last modified dates and actors.
func (*SharedFlowServiceOp) GetDeployments ¶
func (s *SharedFlowServiceOp) GetDeployments(name string) (*SharedFlowDeployment, *Response, error)
GetDeployments retrieves the information about deployments of a shared flow in an organization, including the environment names and revision numbers.
func (*SharedFlowServiceOp) Import ¶
func (s *SharedFlowServiceOp) Import(name string, source string) (*SharedFlowRevision, *Response, error)
Import an SharedFlow into an organization, creating a new shared flow revision. The sharedflow can be passed as "nil" in which case the name is derived from the source. The source can be either a filesystem directory containing an exploded shared flow bundle, OR the path of a zip file containing an SharedFlow bundle. Returns the shared flow revision information. This method does not deploy the imported shared flow. See the Deploy method.
func (*SharedFlowServiceOp) List ¶
func (s *SharedFlowServiceOp) List() ([]string, *Response, error)
List retrieves the list of sharedFlow names for the organization referred by the EdgeClient.
func (*SharedFlowServiceOp) ReDeploy ¶
func (s *SharedFlowServiceOp) ReDeploy(sharedFlowName, env string, rev Revision, delay int, override bool) (*SharedFlowRevisionDeployments, *Response, error)
func (*SharedFlowServiceOp) Undeploy ¶
func (s *SharedFlowServiceOp) Undeploy(sharedFlowName, env string, rev Revision) (*SharedFlowRevisionDeployment, *Response, error)
Undeploy a specific revision of a shared flow from a particular environment within an Edge organization.
type TargetServer ¶
type TargetServersService ¶
type TargetServersService interface { Get(string, string) (*TargetServer, *Response, error) Create(TargetServer, string) (*TargetServer, *Response, error) Delete(string, string) (*Response, error) Update(TargetServer, string) (*TargetServer, *Response, error) }
TargetServersService is an interface for interfacing with the Apigee Edge Admin API dealing with target servers.
type TargetServersServiceOp ¶
type TargetServersServiceOp struct {
// contains filtered or unexported fields
}
func (*TargetServersServiceOp) Create ¶
func (s *TargetServersServiceOp) Create(targetServer TargetServer, env string) (*TargetServer, *Response, error)
func (*TargetServersServiceOp) Delete ¶
func (s *TargetServersServiceOp) Delete(name string, env string) (*Response, error)
func (*TargetServersServiceOp) Get ¶
func (s *TargetServersServiceOp) Get(name string, env string) (*TargetServer, *Response, error)
func (*TargetServersServiceOp) Update ¶
func (s *TargetServersServiceOp) Update(targetServer TargetServer, env string) (*TargetServer, *Response, error)
type Timestamp ¶
Timestamp represents a time that can be unmarshalled from a JSON string formatted as "java time" = milliseconds-since-unix-epoch.
func (Timestamp) MarshalJSON ¶
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.