Documentation ¶
Index ¶
Constants ¶
const ServicesAttr = "istio-services"
ServicesAttr is the name of the Product attribute that lists the Istio services 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"` // CreatedAt int64 `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` Description string `json:"description,omitempty"` DisplayName string `json:"displayName,omitempty"` Environments []string `json:"environments,omitempty"` // LastModifiedAt int64 `json:"lastModifiedAt,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` Name string `json:"name,omitempty"` QuotaLimit string `json:"quota,omitempty"` QuotaInterval string `json:"quotaInterval,omitempty"` QuotaTimeUnit string `json:"quotaTimeUnit,omitempty"` Resources []string `json:"apiResources"` Scopes []string `json:"scopes"` Targets []string 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) GetBoundServices ¶
func (p *APIProduct) GetBoundServices() []string
GetBoundServices returns an array of service names bound to this product
func (*APIProduct) GetServicesAttribute ¶
func (p *APIProduct) GetServicesAttribute() *Attribute
GetServicesAttribute returns a pointer the services attribute or nil
type APIResponse ¶
type APIResponse struct {
APIProducts []APIProduct `json:"apiProduct"`
}
APIResponse is the response from the Apigee products API
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
A Manager wraps all things related to a set of API products.
func NewManager ¶
NewManager creates a new product.Manager. Call Close() when done.
func (*Manager) Products ¶
func (p *Manager) Products() ProductsMap
Products atomically gets a mapping of name => APIProduct.
type Options ¶
type Options struct { // Client is a configured HTTPClient Client *http.Client // BaseURL of the Apigee customer proxy BaseURL *url.URL // RefreshRate determines how often the products are refreshed RefreshRate time.Duration // Key is provisioning key Key string // Secret is provisioning secret Secret string }
Options allows us to specify options for how this product manager will run.
type ProductsMap ¶
type ProductsMap map[string]*APIProduct
ProductsMap is a map of API Product name to API Product