Documentation ¶
Index ¶
Constants ¶
const TargetsAttr = "apigee-remote-service-targets"
TargetsAttr is the name of the Product attribute that lists the targets (apis) it binds to (comma delim)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIProduct ¶
type APIProduct struct { Attributes []Attribute `json:"attributes,omitempty"` Description string `json:"description,omitempty"` DisplayName string `json:"displayName,omitempty"` Environments []string `json:"environments,omitempty"` Name string `json:"name,omitempty"` OperationGroup *OperationGroup `json:"operationGroup,omitempty"` Proxies []string `json:"proxies"` QuotaLimit string `json:"quota,omitempty"` QuotaInterval string `json:"quotaInterval,omitempty"` QuotaTimeUnit string `json:"quotaTimeUnit,omitempty"` Resources []string `json:"apiResources"` Scopes []string `json:"scopes"` APIs []string EnvironmentMap map[string]struct{} QuotaLimitInt int64 QuotaIntervalInt int64 // contains filtered or unexported fields }
An APIProduct is an Apigee API product. See the Apigee docs for details: https://docs.apigee.com/api-platform/publish/what-api-product
func (*APIProduct) GetBoundAPIs ¶
func (p *APIProduct) GetBoundAPIs() []string
GetBoundAPIs returns an array of api names bound to this product
func (*APIProduct) UnmarshalJSON ¶
func (p *APIProduct) UnmarshalJSON(data []byte) error
type APIResponse ¶
type APIResponse struct {
APIProducts []APIProduct `json:"apiProduct"`
}
APIResponse is the response from the Apigee products API
type AuthorizedOperation ¶
type AuthorizedOperation struct { ID string QuotaLimit int64 QuotaInterval int64 QuotaTimeUnit string APIProduct string }
AuthorizedOperation is the result of Authorize including Quotas
type Manager ¶
type Manager interface { Products() ProductsNameMap Authorize(authContext *auth.Context, api, path, method string) []AuthorizedOperation Close() }
A Manager wraps all things related to a set of API products.
func NewManager ¶
NewManager creates a new product.Manager. Call Close() when done.
type OperationConfig ¶
type OperationConfig struct { ID string `json:"-"` APISource string `json:"apiSource"` Attributes []Attribute `json:"attributes,omitempty"` Operations []Operation `json:"operations"` Quota *Quota `json:"quota"` // contains filtered or unexported fields }
An OperationConfig is a group of Operations
func (*OperationConfig) UnmarshalJSON ¶
func (oc *OperationConfig) UnmarshalJSON(data []byte) error
type OperationGroup ¶
type OperationGroup struct { OperationConfigType string `json:"operationConfigType"` OperationConfigs []OperationConfig `json:"operationConfigs,omitempty"` }
An OperationGroup holds OperationConfigs
type Options ¶
type Options struct { // Client is a configured HTTPClient Client *http.Client // BaseURL of the Apigee runtime service proxy BaseURL *url.URL // RefreshRate determines how often the products are refreshed RefreshRate time.Duration // Org is organization Org string // Env is environment, "*" means multi-tenant Env string }
Options allows us to specify options for how this product manager will run.
type ProductsNameMap ¶
type ProductsNameMap map[string]*APIProduct
ProductsNameMap is a map of API Product name to API Product