Documentation ¶
Overview ¶
Package apigee provides a client for administering Apigee
Index ¶
- Constants
- 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 AdminAuth
- type ApiProduct
- type ApigeeClient
- type ApigeeClientOptions
- type ApigeeServer
- type Attributes
- type Cache
- type CacheExpiry
- type CachesService
- type CachesServiceOp
- type DeletedItemInfo
- type Deployable
- func (s *Deployable) Delete(client *ApigeeClient, uriPathElement, assetName string) (*DeletedItemInfo, *Response, error)
- func (s *Deployable) DeleteRevision(client *ApigeeClient, uriPathElement, assetName string, rev Revision) (*DeployableRevision, *Response, error)
- func (s *Deployable) Deploy(client *ApigeeClient, uriPathElement, assetName, basepath, env string, ...) (*RevisionDeployment, *Response, error)
- func (s *Deployable) Export(client *ApigeeClient, uriPathElement, assetName string, rev Revision) (string, *Response, error)
- func (s *Deployable) Get(client *ApigeeClient, uriPathElement, assetName string) (*DeployableAsset, *Response, error)
- func (s *Deployable) GetDeployments(client *ApigeeClient, uriPathElement, assetName string) (*Deployment, *Response, error)
- func (s *Deployable) Import(client *ApigeeClient, uriPathElement, assetName, source string) (*DeployableRevision, *Response, error)
- func (s *Deployable) List(client *ApigeeClient, uriPathElement string) ([]string, *Response, error)
- func (s *Deployable) Undeploy(client *ApigeeClient, uriPathElement, assetName, env string, rev Revision) (*RevisionDeployment, *Response, error)
- type DeployableAsset
- type DeployableMetadata
- type DeployableRevision
- type Deployment
- type Developer
- type DeveloperApp
- type DeveloperAppsService
- type DeveloperAppsServiceOp
- func (s *DeveloperAppsServiceOp) Approve(appName string) (*Response, error)
- func (s *DeveloperAppsServiceOp) Create(app DeveloperApp) (*DeveloperApp, *Response, error)
- func (s *DeveloperAppsServiceOp) Delete(appName string) (*DeveloperApp, *Response, error)
- func (s *DeveloperAppsServiceOp) Get(appName string) (*DeveloperApp, *Response, error)
- func (s *DeveloperAppsServiceOp) List() ([]string, *Response, error)
- func (s *DeveloperAppsServiceOp) Revoke(appName string) (*Response, error)
- func (s *DeveloperAppsServiceOp) Update(app DeveloperApp) (*DeveloperApp, *Response, error)
- type DevelopersService
- type DevelopersServiceOp
- func (s *DevelopersServiceOp) Approve(developerEmailOrId string) (*Response, error)
- func (s *DevelopersServiceOp) Apps(developerEmailOrId string) DeveloperAppsService
- func (s *DevelopersServiceOp) Create(dev Developer) (*Developer, *Response, error)
- func (s *DevelopersServiceOp) Delete(devEmailOrId string) (*Developer, *Response, error)
- func (s *DevelopersServiceOp) Get(developerEmailOrId string) (*Developer, *Response, error)
- func (s *DevelopersServiceOp) List() ([]string, *Response, error)
- func (s *DevelopersServiceOp) Revoke(developerEmailOrId string) (*Response, error)
- func (s *DevelopersServiceOp) Update(dev Developer) (*Developer, *Response, error)
- type Environment
- type EnvironmentDeployment
- type EnvironmentsService
- type EnvironmentsServiceOp
- type ErrorResponse
- type ListOptions
- type Organization
- type OrganizationService
- type OrganizationServiceOp
- type ProductsService
- type ProductsServiceOp
- func (s *ProductsServiceOp) Create(product ApiProduct) (*ApiProduct, *Response, error)
- func (s *ProductsServiceOp) Delete(productName string) (*ApiProduct, *Response, error)
- func (s *ProductsServiceOp) Get(productName string) (*ApiProduct, *Response, error)
- func (s *ProductsServiceOp) List() ([]string, *Response, error)
- func (s *ProductsServiceOp) Update(product ApiProduct) (*ApiProduct, *Response, error)
- type PropertyWrapper
- type ProxiesService
- type ProxiesServiceOp
- func (s *ProxiesServiceOp) Delete(proxyName string) (*DeletedItemInfo, *Response, error)
- func (s *ProxiesServiceOp) DeleteRevision(proxyName string, rev Revision) (*DeployableRevision, *Response, error)
- func (s *ProxiesServiceOp) Deploy(proxyName, env string, rev Revision) (*RevisionDeployment, *Response, error)
- func (s *ProxiesServiceOp) DeployAtPath(proxyName, basepath, env string, rev Revision) (*RevisionDeployment, *Response, error)
- func (s *ProxiesServiceOp) Export(proxyName string, rev Revision) (string, *Response, error)
- func (s *ProxiesServiceOp) Get(proxyName string) (*DeployableAsset, *Response, error)
- func (s *ProxiesServiceOp) GetDeployments(proxyName string) (*Deployment, *Response, error)
- func (s *ProxiesServiceOp) Import(proxyName string, source string) (*DeployableRevision, *Response, error)
- func (s *ProxiesServiceOp) List() ([]string, *Response, error)
- func (s *ProxiesServiceOp) Undeploy(proxyName, env string, rev Revision) (*RevisionDeployment, *Response, error)
- type RequestCompletionCallback
- type Response
- type Revision
- type RevisionDeployment
- type Timespan
- type Timestamp
Constants ¶
const (
DeploymentDelay = "20"
)
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 AdminAuth ¶
type AdminAuth 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 }
AdminAuth holds information about how to authenticate to the Edge Management server.
type ApiProduct ¶
type ApiProduct struct { Name string `json:"name,omitempty"` ApiResources []string `json:"apiResources,omitempty"` ApprovalType string `json:"approvalType,omitempty"` Attributes Attributes `json:"attributes,omitempty"` CreatedBy string `json:"createdBy,omitempty"` CreatedAt Timestamp `json:"createdAt,omitempty"` Description string `json:"description,omitempty"` DisplayName string `json:"displayName,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` LastModifiedAt Timestamp `json:"lastModifiedAt,omitempty"` Environments []string `json:"environments,omitempty"` Proxies []string `json:"proxies,omitempty"` Scopes []string `json:"scopes,omitempty"` }
ApiProduct contains information about an API Product within an Edge organization.
type ApigeeClient ¶
type ApigeeClient struct { // Base URL for API requests. BaseURL *url.URL // User agent for client UserAgent string // Services used for communicating with the API Proxies ProxiesService Products ProductsService Developers DevelopersService Environments EnvironmentsService Organization OrganizationService Caches CachesService Options ApigeeClientOptions // contains filtered or unexported fields }
ApigeeClient manages communication with Apigee V1 Admin API.
func NewApigeeClient ¶
func NewApigeeClient(o *ApigeeClientOptions) (*ApigeeClient, error)
NewApigeeClient returns a new ApigeeClient.
func (*ApigeeClient) Do ¶
func (c *ApigeeClient) 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 (*ApigeeClient) NewRequest ¶
func (c *ApigeeClient) NewRequest(method, urlStr string, body interface{}) (*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 (*ApigeeClient) OnRequestCompleted ¶
func (c *ApigeeClient) OnRequestCompleted(rc RequestCompletionCallback)
sets the request completion callback for the API
type ApigeeClientOptions ¶
type ApigeeClientOptions 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 *AdminAuth // Optional. Warning: if set to true, HTTP Basic Auth base64 blobs will appear in output. Debug bool // contains filtered or unexported fields }
type ApigeeServer ¶
type ApigeeServer 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 Attributes ¶
Attributes represents a revision number. Edge returns rev numbers in string form. This marshals and unmarshals between that format and int.
func (Attributes) MarshalJSON ¶
func (attrs Attributes) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface. It marshals from an Attributes object (which is really a map[string]string) into a JSON that looks like
[ { "name" : "aaaaaa", "value" : "1234abcd"}, { "name" : "...", "value" : "..."} ]
func (Attributes) String ¶
func (a Attributes) String() string
func (*Attributes) UnmarshalJSON ¶
func (attrs *Attributes) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface. It unmarshals from a string like "2" (including the quotes), into an integer 2.
type Cache ¶
type Cache struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` OverflowToDisk bool `json:"overflowToDisk,omitempty"` Persistent bool `json:"persistent,omitempty"` Distributed bool `json:"distributed,omitempty"` DiskSizeInMB int `json:"diskSizeInMB,omitempty"` InMemorySizeInKB int `json:"inMemorySizeInKB,omitempty"` MaxElementsInMemory int `json:"maxElementsInMemory,omitempty"` MaxElementsOnDisk int `json:"maxElementsOnDisk,omitempty"` Expiry CacheExpiry `json:"expirySettings,omitempty"` }
Cache contains information about a cache within an Edge organization.
type CacheExpiry ¶
CacheExpiry represents the expiry settings on a cache. This struct marshals and unmarshals between the json format Edge uses and a reasonably clear golang struct.
func (CacheExpiry) MarshalJSON ¶
func (ce CacheExpiry) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface. It marshals from the form used by Apigee Edge into a CacheExpiry struct. Eg,
{ "expiryDate": { "value": "{mm-dd-yyyy}" }, "valuesNull" : false }
func (CacheExpiry) String ¶
func (ce CacheExpiry) String() string
func (*CacheExpiry) UnmarshalJSON ¶
func (ce *CacheExpiry) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface. It unmarshals from a string like
{ "expiryDate": { "value": "{mm-dd-yyyy}" }, "valuesNull" : false }
...into a CacheExpiry struct.
type CachesService ¶
type CachesService interface { List(string) ([]string, *Response, error) Get(string, string) (*Cache, *Response, error) }
CachesService is an interface for interfacing with the Apigee Edge Admin API dealing with caches.
type CachesServiceOp ¶
type CachesServiceOp struct {
// contains filtered or unexported fields
}
func (*CachesServiceOp) Get ¶
func (s *CachesServiceOp) Get(name, env string) (*Cache, *Response, error)
Get retrieves the information about a Cache in an organization, or about a cache in an environment within an organization. This information includes the properties, and the created and last modified details.
type DeletedItemInfo ¶
type DeletedItemInfo 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 Deployable ¶
type Deployable struct{}
func (*Deployable) Delete ¶
func (s *Deployable) Delete(client *ApigeeClient, uriPathElement, assetName string) (*DeletedItemInfo, *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 (*Deployable) DeleteRevision ¶
func (s *Deployable) DeleteRevision(client *ApigeeClient, uriPathElement, assetName string, rev Revision) (*DeployableRevision, *Response, error)
func (*Deployable) Deploy ¶
func (s *Deployable) Deploy(client *ApigeeClient, uriPathElement, assetName, basepath, env string, rev Revision) (*RevisionDeployment, *Response, error)
func (*Deployable) Export ¶
func (s *Deployable) Export(client *ApigeeClient, uriPathElement, assetName string, rev Revision) (string, *Response, error)
func (*Deployable) Get ¶
func (s *Deployable) Get(client *ApigeeClient, uriPathElement, assetName string) (*DeployableAsset, *Response, error)
func (*Deployable) GetDeployments ¶
func (s *Deployable) GetDeployments(client *ApigeeClient, uriPathElement, assetName string) (*Deployment, *Response, error)
func (*Deployable) Import ¶
func (s *Deployable) Import(client *ApigeeClient, uriPathElement, assetName, source string) (*DeployableRevision, *Response, error)
func (*Deployable) List ¶
func (s *Deployable) List(client *ApigeeClient, uriPathElement string) ([]string, *Response, error)
func (*Deployable) Undeploy ¶
func (s *Deployable) Undeploy(client *ApigeeClient, uriPathElement, assetName, env string, rev Revision) (*RevisionDeployment, *Response, error)
type DeployableAsset ¶
type DeployableAsset struct { Revisions []Revision `json:"revision,omitempty"` Name string `json:"name,omitempty"` MetaData DeployableMetadata `json:"metaData,omitempty"` }
DeployableAsset contains information about an API Proxy or SharedFlow within an Apigee organization.
type DeployableMetadata ¶
type DeployableMetadata 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 DeployableRevision ¶
type DeployableRevision struct { Name string `json:"name,omitempty"` DisplayName string `json:"displayName,omitempty"` Revision Revision `json:"revision,omitempty"` CreatedBy string `json:"createdBy,omitempty"` CreatedAt Timestamp `json:"createdAt,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` LastModifiedAt Timestamp `json:"lastModifiedAt,omitempty"` Description string `json:"description,omitempty"` ContextInfo string `json:"contextInfo,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"` }
DeployableRevision holds information about a revision of an API Proxy, or a SharedFlow.
type Deployment ¶
type Deployment struct { Environments []EnvironmentDeployment `json:"environment,omitempty"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` }
Deployment (nee ProxyDeployment) holds information about the deployment state of a all revisions of an API Proxy or SharedFlow.
type Developer ¶
type Developer struct { UserName string `json:"userName,omitempty"` LastName string `json:"lastName,omitempty"` FirstName string `json:"firstName,omitempty"` Status string `json:"status,omitempty"` // active, inactive, ?? Attributes Attributes `json:"attributes,omitempty"` Companies []string `json:"companies,omitempty"` OrganizationName string `json:"organizationName,omitempty"` Email string `json:"email,omitempty"` Id string `json:"uuid,omitempty"` Apps []string `json:"apps,omitempty"` }
Developer contains information about a registered Developer within an Edge organization.
type DeveloperApp ¶
type DeveloperApp struct { Name string `json:"name,omitempty"` ApiProducts []string `json:"apiProducts,omitempty"` InitialKeyExpiry string `json:"keyExpiresIn,omitempty"` Attributes Attributes `json:"attributes,omitempty"` Id string `json:"appId,omitempty"` DeveloperId string `json:"developerId,omitempty"` Scopes []string `json:"scopes,omitempty"` Status string `json:"status,omitempty"` }
DeveloperApp holds information about a registered DeveloperApp.
type DeveloperAppsService ¶
type DeveloperAppsService interface { Create(DeveloperApp) (*DeveloperApp, *Response, error) Delete(string) (*DeveloperApp, *Response, error) Revoke(string) (*Response, error) Approve(string) (*Response, error) List() ([]string, *Response, error) Get(string) (*DeveloperApp, *Response, error) Update(DeveloperApp) (*DeveloperApp, *Response, error) }
DeveloperAppsService is an interface for interfacing with the Apigee Edge Admin API dealing with apps that belong to a particular developer.
type DeveloperAppsServiceOp ¶
type DeveloperAppsServiceOp struct {
// contains filtered or unexported fields
}
func (*DeveloperAppsServiceOp) Approve ¶
func (s *DeveloperAppsServiceOp) Approve(appName string) (*Response, error)
func (*DeveloperAppsServiceOp) Create ¶
func (s *DeveloperAppsServiceOp) Create(app DeveloperApp) (*DeveloperApp, *Response, error)
func (*DeveloperAppsServiceOp) Delete ¶
func (s *DeveloperAppsServiceOp) Delete(appName string) (*DeveloperApp, *Response, error)
func (*DeveloperAppsServiceOp) Get ¶
func (s *DeveloperAppsServiceOp) Get(appName string) (*DeveloperApp, *Response, error)
func (*DeveloperAppsServiceOp) List ¶
func (s *DeveloperAppsServiceOp) List() ([]string, *Response, error)
func (*DeveloperAppsServiceOp) Revoke ¶
func (s *DeveloperAppsServiceOp) Revoke(appName string) (*Response, error)
func (*DeveloperAppsServiceOp) Update ¶
func (s *DeveloperAppsServiceOp) Update(app DeveloperApp) (*DeveloperApp, *Response, error)
type DevelopersService ¶
type DevelopersService interface { List() ([]string, *Response, error) Get(string) (*Developer, *Response, error) Create(Developer) (*Developer, *Response, error) Update(Developer) (*Developer, *Response, error) Delete(string) (*Developer, *Response, error) Revoke(string) (*Response, error) Approve(string) (*Response, error) Apps(string) DeveloperAppsService }
DevelopersService is an interface for interfacing with the Apigee Edge Admin API dealing with developers.
type DevelopersServiceOp ¶
type DevelopersServiceOp struct {
// contains filtered or unexported fields
}
func (*DevelopersServiceOp) Approve ¶
func (s *DevelopersServiceOp) Approve(developerEmailOrId string) (*Response, error)
func (*DevelopersServiceOp) Apps ¶
func (s *DevelopersServiceOp) Apps(developerEmailOrId string) DeveloperAppsService
func (*DevelopersServiceOp) Create ¶
func (s *DevelopersServiceOp) Create(dev Developer) (*Developer, *Response, error)
func (*DevelopersServiceOp) Delete ¶
func (s *DevelopersServiceOp) Delete(devEmailOrId string) (*Developer, *Response, error)
func (*DevelopersServiceOp) Get ¶
func (s *DevelopersServiceOp) Get(developerEmailOrId string) (*Developer, *Response, error)
func (*DevelopersServiceOp) List ¶
func (s *DevelopersServiceOp) List() ([]string, *Response, error)
type Environment ¶
type Environment struct { Name string `json:"name,omitempty"` CreatedBy string `json:"createdBy,omitempty"` CreatedAt Timestamp `json:"createdAt,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` LastModifiedAt Timestamp `json:"lastModifiedAt,omitempty"` Properties PropertyWrapper `json:"properties,omitempty"` }
Environment contains information about an environment within an Edge organization.
type EnvironmentDeployment ¶
type EnvironmentDeployment struct { Name string `json:"name,omitempty"` Revision []RevisionDeployment `json:"revision,omitempty"` }
type EnvironmentsService ¶
type EnvironmentsService interface { List() ([]string, *Response, error) Get(string) (*Environment, *Response, error) }
EnvironmentsService is an interface for interfacing with the Apigee Edge Admin API querying Edge environments.
type EnvironmentsServiceOp ¶
type EnvironmentsServiceOp struct {
// contains filtered or unexported fields
}
func (*EnvironmentsServiceOp) Get ¶
func (s *EnvironmentsServiceOp) Get(env string) (*Environment, *Response, error)
Get retrieves the information about an Environment in an organization, information including the properties, and the created and last modified details.
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 ListOptions ¶
type ListOptions struct { // to ask for expanded results Expand bool `url:"expand"` }
ListOptions holds optional parameters to various List methods
type Organization ¶
type Organization struct { LastModifiedBy string `json:"lastModifiedBy,omitempty"` CreatedBy string `json:"createdBy,omitempty"` LastModifiedAt Timestamp `json:"lastModifiedAt,omitempty"` CreatedAt Timestamp `json:"createdAt,omitempty"` DisplayName string `json:"displayName,omitempty"` Environments []string `json:"environments,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Properties PropertyWrapper `json:"properties,omitempty"` }
type OrganizationService ¶
type OrganizationService interface {
Get(string) (*Organization, *Response, error)
}
OrganizationsService is an interface for interfacing with the Apigee Edge Admin API querying Edge environments.
type OrganizationServiceOp ¶
type OrganizationServiceOp struct {
// contains filtered or unexported fields
}
func (*OrganizationServiceOp) Get ¶
func (s *OrganizationServiceOp) Get(org string) (*Organization, *Response, error)
Get retrieves the information about an Organization, information including the properties, and the created and last modified details, the list of Environments, etc.
type ProductsService ¶
type ProductsService interface { List() ([]string, *Response, error) Get(string) (*ApiProduct, *Response, error) Create(ApiProduct) (*ApiProduct, *Response, error) Update(ApiProduct) (*ApiProduct, *Response, error) Delete(string) (*ApiProduct, *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 ApiProduct) (*ApiProduct, *Response, error)
func (*ProductsServiceOp) Delete ¶
func (s *ProductsServiceOp) Delete(productName string) (*ApiProduct, *Response, error)
func (*ProductsServiceOp) Get ¶
func (s *ProductsServiceOp) Get(productName string) (*ApiProduct, *Response, error)
Get retrieves the information about an API Product in an organization, information including the list of API Proxies, the scopes, the quota, and other attributes.
func (*ProductsServiceOp) List ¶
func (s *ProductsServiceOp) List() ([]string, *Response, error)
List retrieves the list of apiproduct names for the organization referred by the ApigeeClient.
func (*ProductsServiceOp) Update ¶
func (s *ProductsServiceOp) Update(product ApiProduct) (*ApiProduct, *Response, error)
type PropertyWrapper ¶
type PropertyWrapper struct {
Property Attributes `json:"property,omitempty"`
}
This is just a wrapper struct to aid in serialization and de-serialization.
type ProxiesService ¶
type ProxiesService interface { List() ([]string, *Response, error) Get(string) (*DeployableAsset, *Response, error) Import(string, string) (*DeployableRevision, *Response, error) Delete(string) (*DeletedItemInfo, *Response, error) DeleteRevision(string, Revision) (*DeployableRevision, *Response, error) Deploy(string, string, Revision) (*RevisionDeployment, *Response, error) DeployAtPath(string, string, string, Revision) (*RevisionDeployment, *Response, error) Undeploy(string, string, Revision) (*RevisionDeployment, *Response, error) Export(string, Revision) (string, *Response, error) GetDeployments(string) (*Deployment, *Response, error) }
ProxiesService is an interface for interfacing with the Apigee Admin API dealing with apiproxies.
type ProxiesServiceOp ¶
type ProxiesServiceOp struct {
// contains filtered or unexported fields
}
func (*ProxiesServiceOp) Delete ¶
func (s *ProxiesServiceOp) Delete(proxyName string) (*DeletedItemInfo, *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) (*DeployableRevision, *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) (*RevisionDeployment, *Response, error)
Deploy a revision of an API proxy to a specific environment within an organization.
func (*ProxiesServiceOp) DeployAtPath ¶
func (s *ProxiesServiceOp) DeployAtPath(proxyName, basepath, env string, rev Revision) (*RevisionDeployment, *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(proxyName string) (*DeployableAsset, *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(proxyName string) (*Deployment, *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) (*DeployableRevision, *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)
retrieve the list of apiproxy names for the organization referred by the ApigeeClient.
func (*ProxiesServiceOp) Undeploy ¶
func (s *ProxiesServiceOp) Undeploy(proxyName, env string, rev Revision) (*RevisionDeployment, *Response, error)
Undeploy a specific revision of an API Proxy from a particular environment within an Edge organization.
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 []ApigeeServer `json:"server,omitempty"` }
type Timespan ¶
Timespan represents a timespan that can be parsed from a string like "3d" meaning "3 days". It will typically be serialized as milliseconds = milliseconds-since-unix-epoch.
func NewTimespan ¶
func (Timespan) MarshalJSON ¶
func (*Timespan) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
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.