masherytypes

package
v0.0.0-...-8a9b062 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NilParser

func NilParser(dat []byte) (interface{}, int, error)

func ParseErrorSet

func ParseErrorSet(dat []byte) (interface{}, int, error)

func ParseErrorSetMessage

func ParseErrorSetMessage(dat []byte) (interface{}, int, error)

func ParseMasheryAddressableObject

func ParseMasheryAddressableObject(dat []byte) (interface{}, int, error)

func ParseMasheryAddressableObjectsArray

func ParseMasheryAddressableObjectsArray(dat []byte) (interface{}, int, error)

func ParseMasheryApplication

func ParseMasheryApplication(dat []byte) (interface{}, int, error)

func ParseMasheryApplicationArray

func ParseMasheryApplicationArray(dat []byte) (interface{}, int, error)

func ParseMasheryDomainAddressArray

func ParseMasheryDomainAddressArray(dat []byte) (interface{}, int, error)

func ParseMasheryEmailTemplateSet

func ParseMasheryEmailTemplateSet(dat []byte) (interface{}, int, error)

func ParseMasheryEmailTemplateSetArray

func ParseMasheryEmailTemplateSetArray(dat []byte) (interface{}, int, error)

func ParseMasheryEndpoint

func ParseMasheryEndpoint(dat []byte) (interface{}, int, error)

func ParseMasheryEndpointArray

func ParseMasheryEndpointArray(dat []byte) (interface{}, int, error)

func ParseMasheryMember

func ParseMasheryMember(dat []byte) (interface{}, int, error)

func ParseMasheryMemberArray

func ParseMasheryMemberArray(dat []byte) (interface{}, int, error)

func ParseMasheryOriganizationsArray

func ParseMasheryOriganizationsArray(dat []byte) (interface{}, int, error)

func ParseMasheryPackage

func ParseMasheryPackage(dat []byte) (interface{}, int, error)

func ParseMasheryPackageArray

func ParseMasheryPackageArray(dat []byte) (interface{}, int, error)

func ParseMasheryPackageKey

func ParseMasheryPackageKey(dat []byte) (interface{}, int, error)

func ParseMasheryPackageKeyArray

func ParseMasheryPackageKeyArray(dat []byte) (interface{}, int, error)

func ParseMasheryPlan

func ParseMasheryPlan(dat []byte) (interface{}, int, error)

func ParseMasheryPlanArray

func ParseMasheryPlanArray(dat []byte) (interface{}, int, error)

func ParseMasheryRole

func ParseMasheryRole(dat []byte) (interface{}, int, error)

func ParseMasheryRoleArray

func ParseMasheryRoleArray(dat []byte) (interface{}, int, error)

func ParseMasheryRolePermission

func ParseMasheryRolePermission(dat []byte) (interface{}, int, error)

func ParseMasheryServiceArray

func ParseMasheryServiceArray(dat []byte) (interface{}, int, error)

func ParseMasheryServiceSecurityProfileOAuth

func ParseMasheryServiceSecurityProfileOAuth(dat []byte) (interface{}, int, error)

func ParsePacakgePlanServiceEndpointMethod

func ParsePacakgePlanServiceEndpointMethod(inp []byte) (interface{}, int, error)

func ParsePackagePlanServiceEndpointMethodFilter

func ParsePackagePlanServiceEndpointMethodFilter(inp []byte) (interface{}, int, error)

func ParsePackagePlanServiceEndpointMethodFilterArray

func ParsePackagePlanServiceEndpointMethodFilterArray(inp []byte) (interface{}, int, error)

func ParseRolePermissionArray

func ParseRolePermissionArray(dat []byte) (interface{}, int, error)

func ParseService

func ParseService(dat []byte) (interface{}, int, error)

func ParseServiceCache

func ParseServiceCache(dat []byte) (interface{}, int, error)

func ParseServiceEndpointMethod

func ParseServiceEndpointMethod(inp []byte) (interface{}, int, error)

func ParseServiceEndpointMethodArray

func ParseServiceEndpointMethodArray(inp []byte) (interface{}, int, error)

func ParseServiceEndpointMethodFilter

func ParseServiceEndpointMethodFilter(inp []byte) (interface{}, int, error)

func ParseServiceEndpointMethodFilterArray

func ParseServiceEndpointMethodFilterArray(inp []byte) (interface{}, int, error)

func ParseServiceErrorSetArray

func ParseServiceErrorSetArray(dat []byte) (interface{}, int, error)

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	TokenType    string `json:"token_type"`
	ApiKey       string `json:"mapi"`
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
}

func (AccessTokenResponse) ObtainedNow

type AddressableV3Object

type AddressableV3Object struct {
	Id        string           `json:"id,omitempty"`
	Name      string           `json:"name,omitempty"`
	Created   *MasheryJSONTime `json:"created,omitempty"`
	Updated   *MasheryJSONTime `json:"updated,omitempty"`
	Retrieved time.Time        `json:"-"`
}

AddressableV3Object base properties of any object that is read through Mashery V3 API

func AddressableEndpoints

func AddressableEndpoints(inp []Endpoint) []AddressableV3Object

type Application

type Application struct {
	AddressableV3Object

	Username          string                   `json:"username"`
	Description       string                   `json:"description,omitempty"`
	Type              string                   `json:"type,omitempty"`
	Commercial        bool                     `json:"commercial"`
	Ads               bool                     `json:"ads"`
	AdsSystem         string                   `json:"adsSystem,omitempty"`
	UsageModel        string                   `json:"usageModel,omitempty"`
	Tags              string                   `json:"tags,omitempty"`
	Notes             string                   `json:"notes,omitempty"`
	HowDidYouHear     string                   `json:"howDidYouHear,omitempty"`
	PreferredProtocol string                   `json:"preferredProtocol,omitempty"`
	PreferredOutput   string                   `json:"preferredOutput,omitempty"`
	ExternalId        string                   `json:"externalId,omitempty"`
	Uri               string                   `json:"uri,omitempty"`
	OAuthRedirectUri  string                   `json:"oauthRedirectUri,omitempty"`
	PackageKeys       *[]ApplicationPackageKey `json:"packageKeys,omitempty"`
	Eav               EAV                      `json:"-"`
}

func (*Application) Identifier

func (a *Application) Identifier() ApplicationIdentifier

type ApplicationIdentifier

type ApplicationIdentifier struct {
	ApplicationId string `json:"aid"`
}

type ApplicationPackageKey

type ApplicationPackageKey struct {
	PackageKey
	ParentApplicationId ApplicationIdentifier `json:"-"`
}

func (*ApplicationPackageKey) Identifier

type ApplicationPackageKeyIdentifier

type ApplicationPackageKeyIdentifier struct {
	PackageKeyIdentifier
	ApplicationIdentifier
}

type BaseMethod

type BaseMethod struct {
	AddressableV3Object
	SampleJsonResponse string `json:"sampleJsonResponse,omitempty"`
	SampleXmlResponse  string `json:"sampleXmlResponse,omitempty"`
}

type Cache

type Cache struct {
	CacheTTLOverride               float64  `json:"cacheTtlOverride"`
	ContentCacheKeyHeaders         []string `json:"contentCacheKeyHeaders"`
	ClientSurrogateControlEnabled  bool     `json:"clientSurrogateControlEnabled"`
	IncludeApiKeyInContentCacheKey bool     `json:"includeApiKeyInContentCacheKey"`
	RespondFromStaleCacheEnabled   bool     `json:"respondFromStaleCacheEnabled"`
	ResponseCacheControlEnabled    bool     `json:"responseCacheControlEnabled"`
	VaryHeaderEnabled              bool     `json:"varyHeaderEnabled"`
}

func (*Cache) IsEmpty

func (c *Cache) IsEmpty() bool

type Cors

type Cors struct {
	AllDomainsEnabled        bool     `json:"allDomainsEnabled"`
	SubDomainMatchingAllowed bool     `json:"subDomainMatchingAllowed"`
	MaxAge                   int      `json:"maxAge"`
	CookiesAllowed           bool     `json:"cookiesAllowed"`
	AllowedDomains           []string `json:"domainsAllowed"`
	AllowedHeaders           []string `json:"headersAllowed"`
	ExposedHeaders           []string `json:"headersExposed"`
}

type Domain

type Domain struct {
	Address string `json:"address"`
}

type DomainAddress

type DomainAddress struct {
	Address string `json:"address"`
}

type EAV

type EAV map[string]string

type EmailTemplate

type EmailTemplate struct {
	AddressableV3Object
	Type    string `json:"type"`
	From    string `json:"from"`
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

EmailTemplate email template

type EmailTemplateSet

type EmailTemplateSet struct {
	AddressableV3Object
	Type           string           `json:"type,omitempty"`
	EmailTemplates *[]EmailTemplate `json:"emailTemplates,omitempty"`
}

EmailTemplateSet email template set

type Endpoint

type Endpoint struct {
	AddressableV3Object

	AllowMissingApiKey                         bool                        `json:"allowMissingApiKey"`
	ApiKeyValueLocationKey                     string                      `json:"apiKeyValueLocationKey,omitempty"`
	ApiKeyValueLocations                       []string                    `json:"apiKeyValueLocations,omitempty"`
	ApiMethodDetectionKey                      string                      `json:"apiMethodDetectionKey,omitempty"`
	ApiMethodDetectionLocations                []string                    `json:"apiMethodDetectionLocations,omitempty"`
	Cache                                      *Cache                      `json:"cache"`
	ConnectionTimeoutForSystemDomainRequest    int                         `json:"connectionTimeoutForSystemDomainRequest"`
	ConnectionTimeoutForSystemDomainResponse   int                         `json:"connectionTimeoutForSystemDomainResponse"`
	CookiesDuringHttpRedirectsEnabled          bool                        `json:"cookiesDuringHttpRedirectsEnabled"`
	Cors                                       *Cors                       `json:"cors"`
	CustomRequestAuthenticationAdapter         *string                     `json:"customRequestAuthenticationAdapter,omitempty"`
	DropApiKeyFromIncomingCall                 bool                        `json:"dropApiKeyFromIncomingCall"`
	ForceGzipOfBackendCall                     bool                        `json:"forceGzipOfBackendCall"`
	GzipPassthroughSupportEnabled              bool                        `json:"gzipPassthroughSupportEnabled"`
	HeadersToExcludeFromIncomingCall           []string                    `json:"headersToExcludeFromIncomingCall,omitempty"`
	HighSecurity                               bool                        `json:"highSecurity"`
	HostPassthroughIncludedInBackendCallHeader bool                        `json:"hostPassthroughIncludedInBackendCallHeader"`
	InboundSslRequired                         bool                        `json:"inboundSslRequired"`
	InboundMutualSslRequired                   bool                        `json:"inboundMsslRequired"`
	JsonpCallbackParameter                     string                      `json:"jsonpCallbackParameter,omitempty"`
	JsonpCallbackParameterValue                string                      `json:"jsonpCallbackParameterValue,omitempty"`
	ScheduledMaintenanceEvent                  *ScheduledMaintenanceEvent  `json:"scheduledMaintenanceEvent,omitempty"`
	ForwardedHeaders                           []string                    `json:"forwardedHeaders,omitempty"`
	ReturnedHeaders                            []string                    `json:"returnedHeaders,omitempty"`
	Methods                                    *[]ServiceEndpointMethod    `json:"methods,omitempty"`
	NumberOfHttpRedirectsToFollow              int                         `json:"numberOfHttpRedirectsToFollow,omitempty"`
	OutboundRequestTargetPath                  string                      `json:"outboundRequestTargetPath,omitempty"`
	OutboundRequestTargetQueryParameters       string                      `json:"outboundRequestTargetQueryParameters,omitempty"`
	OutboundTransportProtocol                  string                      `json:"outboundTransportProtocol,omitempty"`
	Processor                                  *Processor                  `json:"processor,omitempty"`
	PublicDomains                              []Domain                    `json:"publicDomains,omitempty"`
	RequestAuthenticationType                  string                      `json:"requestAuthenticationType,omitempty"`
	RequestPathAlias                           string                      `json:"requestPathAlias,omitempty"`
	RequestProtocol                            string                      `json:"requestProtocol,omitempty"`
	OAuthGrantTypes                            []string                    `json:"oauthGrantTypes,omitempty"`
	StringsToTrimFromApiKey                    string                      `json:"stringsToTrimFromApiKey,omitempty"`
	SupportedHttpMethods                       []string                    `json:"supportedHttpMethods,omitempty"`
	SystemDomainAuthentication                 *SystemDomainAuthentication `json:"systemDomainAuthentication"`
	SystemDomains                              []Domain                    `json:"systemDomains,omitempty"`
	TrafficManagerDomain                       string                      `json:"trafficManagerDomain"`
	UseSystemDomainCredentials                 bool                        `json:"useSystemDomainCredentials"`
	SystemDomainCredentialKey                  *string                     `json:"systemDomainCredentialKey"`
	SystemDomainCredentialSecret               *string                     `json:"systemDomainCredentialSecret"`

	ErrorSet                       *AddressableV3Object `json:"errorSet"`
	UserControlledErrorLocation    string               `json:"userControlledErrorLocation"`
	UserControlledErrorLocationKey string               `json:"userControlledErrorLocationKey"`

	ParentServiceId ServiceIdentifier `json:"-"`
}

func (*Endpoint) Identifier

func (e *Endpoint) Identifier() ServiceEndpointIdentifier

type ErrorSet

type ErrorSet struct {
	AddressableV3Object
	Type          string                 `json:"type,omitempty"`
	JSONP         bool                   `json:"jsonp"`
	JSONPType     string                 `json:"jsonpType,omitempty"`
	ErrorMessages *[]MasheryErrorMessage `json:"errorMessages,omitempty"`

	ParentServiceId ServiceIdentifier `json:"-"`
}

func (*ErrorSet) Identifier

func (es *ErrorSet) Identifier() ErrorSetIdentifier

type ErrorSetIdentifier

type ErrorSetIdentifier struct {
	ServiceIdentifier
	ErrorSetId string `json:"esid"`
}

type ErrorSetMessageIdentifier

type ErrorSetMessageIdentifier struct {
	ErrorSetIdentifier
	ErrorSetMessageId string `json:"esmid"`
}

type IdReferenced

type IdReferenced struct {
	IdRef string `json:"id"`
}

IdReferenced Id referenced data structure, used internally.

type Limit

type Limit struct {
	Period  string `json:"period"`
	Source  string `json:"source"`
	Ceiling int64  `json:"ceiling"`
}

type MasheryErrorMessage

type MasheryErrorMessage struct {
	Id           string `json:"id"`
	Code         int    `json:"code"`
	Status       string `json:"status"`
	DetailHeader string `json:"detailHeader"`
	ResponseBody string `json:"responseBody"`

	ParentErrorSet ErrorSetIdentifier `json:"-"`
}

type MasheryJSONTime

type MasheryJSONTime time.Time

func (*MasheryJSONTime) MarshalJSON

func (t *MasheryJSONTime) MarshalJSON() ([]byte, error)

func (*MasheryJSONTime) ToString

func (t *MasheryJSONTime) ToString() string

func (*MasheryJSONTime) UnmarshalJSON

func (t *MasheryJSONTime) UnmarshalJSON(b []byte) error

type MasheryOAuth

type MasheryOAuth struct {
	AccessTokenTtlEnabled       bool     `json:"accessTokenTtlEnabled"`
	AccessTokenTtl              int64    `json:"accessTokenTtl"`
	AccessTokenType             string   `json:"accessTokenType"`
	AllowMultipleToken          bool     `json:"allowMultipleToken"`
	AuthorizationCodeTtl        int64    `json:"authorizationCodeTtl"`
	ForwardedHeaders            []string `json:"forwardedHeaders"`
	MasheryTokenApiEnabled      bool     `json:"masheryTokenApiEnabled"`
	RefreshTokenEnabled         bool     `json:"refreshTokenEnabled"`
	EnableRefreshTokenTtl       bool     `json:"enableRefreshTokenTtl"`
	TokenBasedRateLimitsEnabled bool     `json:"tokenBasedRateLimitsEnabled"`
	ForceOauthRedirectUrl       bool     `json:"forceOauthRedirectUrl"`
	ForceSslRedirectUrlEnabled  bool     `json:"forceSslRedirectUrlEnabled"`
	GrantTypes                  []string `json:"grantTypes"`
	MACAlgorithm                string   `json:"macAlgorithm,omitempty"`
	QPSLimitCeiling             int64    `json:"qpsLimitCeiling"`
	RateLimitCeiling            int64    `json:"rateLimitCeiling"`
	RefreshTokenTtl             int64    `json:"refreshTokenTtl"`
	SecureTokensEnabled         bool     `json:"secureTokensEnabled"`

	ParentService ServiceIdentifier `json:"-"`
}

type MasherySecurityProfile

type MasherySecurityProfile struct {
	OAuth *MasheryOAuth `json:"oauth,omitempty"`
}

type Member

type Member struct {
	AddressableV3Object

	Username     string         `json:"username,omitempty"`
	Email        string         `json:"email,omitempty"`
	DisplayName  string         `json:"displayName,omitempty"`
	Uri          string         `json:"uri"`
	Blog         string         `json:"blog"`
	Im           string         `json:"im"`
	Imsvc        string         `json:"imsvc"`
	Phone        string         `json:"phone"`
	Company      string         `json:"company"`
	Address1     string         `json:"address1"`
	Address2     string         `json:"address2"`
	Locality     string         `json:"locality"`
	Region       string         `json:"region"`
	PostalCode   string         `json:"postalCode"`
	CountryCode  string         `json:"countryCode"`
	FirstName    string         `json:"firstName"`
	LastName     string         `json:"lastName"`
	AreaStatus   string         `json:"areaStatus,omitempty"`
	ExternalId   string         `json:"externalId"`
	PasswdNew    *string        `json:"passwdNew,omitempty"`
	Applications *[]Application `json:"applications,omitempty"`
	PackageKeys  *[]PackageKey  `json:"packageKeys,omitempty"`
	Roles        *[]Role        `json:"roles,omitempty"`
}

func (*Member) Identifier

func (m *Member) Identifier() MemberIdentifier

type MemberIdentifier

type MemberIdentifier struct {
	MemberId string `json:"mid"`
	Username string `json:"u"`
}

MemberIdentifier Member identifier

type NilAddressableOrganization

type NilAddressableOrganization struct {
	Id               *string                      `json:"id"`
	Parent           *string                      `json:"parent"`
	Name             string                       `json:"name,omitempty"`
	Created          *MasheryJSONTime             `json:"created,omitempty"`
	Updated          *MasheryJSONTime             `json:"updated,omitempty"`
	SubOrganizations []NilAddressableOrganization `json:"suborganizations"`
}

type Organization

type Organization struct {
	AddressableV3Object
	SubOrganizations []Organization `json:"suborganizations"`
}

type Package

type Package struct {
	AddressableV3Object
	Description                 string        `json:"description,omitempty"`
	NotifyDeveloperPeriod       string        `json:"notifyDeveloperPeriod,omitempty"`
	NotifyDeveloperNearQuota    bool          `json:"notifyDeveloperNearQuota"`
	NotifyDeveloperOverQuota    bool          `json:"notifyDeveloperOverQuota"`
	NotifyDeveloperOverThrottle bool          `json:"notifyDeveloperOverThrottle"`
	NotifyAdminPeriod           string        `json:"notifyAdminPeriod,omitempty"`
	NotifyAdminNearQuota        bool          `json:"notifyAdminNearQuota"`
	NotifyAdminOverQuota        bool          `json:"notifyAdminOverQuota"`
	NotifyAdminOverThrottle     bool          `json:"notifyAdminOverThrottle"`
	NotifyAdminEmails           string        `json:"notifyAdminEmails,omitempty"`
	NearQuotaThreshold          *int          `json:"nearQuotaThreshold,omitempty"`
	Eav                         *EAV          `json:"eav,omitempty"`
	KeyAdapter                  string        `json:"keyAdapter,omitempty"`
	KeyLength                   *int          `json:"keyLength,omitempty"`
	SharedSecretLength          *int          `json:"sharedSecretLength,omitempty"`
	Plans                       []Plan        `json:"plans,omitempty"`
	Organization                *Organization `json:"organization,omitempty"`
}

func (*Package) Identifier

func (p *Package) Identifier() PackageIdentifier

type PackageIdentifier

type PackageIdentifier struct {
	PackageId string `json:"pid"`
}

func PackageIdentityFrom

func PackageIdentityFrom(id string) PackageIdentifier

type PackageKey

type PackageKey struct {
	AddressableV3Object
	Apikey           *string  `json:"apikey"`
	Secret           *string  `json:"secret"`
	RateLimitCeiling *int64   `json:"rateLimitCeiling"`
	RateLimitExempt  bool     `json:"rateLimitExempt"`
	QpsLimitCeiling  *int64   `json:"qpsLimitCeiling"`
	QpsLimitExempt   bool     `json:"qpsLimitExempt"`
	Status           string   `json:"status"`
	Limits           *[]Limit `json:"limits,omitempty"`
	Package          *Package `json:"package,omitempty"`
	Plan             *Plan    `json:"plan,omitempty"`
	Expires          string   `json:"expires,omitempty"`
}

func (*PackageKey) Identifier

func (mpk *PackageKey) Identifier() PackageKeyIdentifier

func (*PackageKey) LinksPackageAndPlan

func (mpk *PackageKey) LinksPackageAndPlan() bool

type PackageKeyIdentifier

type PackageKeyIdentifier struct {
	PackageKeyId string `json:"pkid"`
}

type PackagePlanIdentifier

type PackagePlanIdentifier struct {
	PackageIdentifier
	PlanId string `json:"plid"`
}

func PackagePlanIdentityFrom

func PackagePlanIdentityFrom(packageId, planId string) PackagePlanIdentifier

type PackagePlanServiceEndpointIdentifier

type PackagePlanServiceEndpointIdentifier struct {
	PackagePlanIdentifier
	ServiceEndpointIdentifier
}

type PackagePlanServiceEndpointMethod

type PackagePlanServiceEndpointMethod struct {
	BaseMethod
	PackagePlanServiceEndpoint PackagePlanServiceEndpointIdentifier
}

func (*PackagePlanServiceEndpointMethod) Identifier

type PackagePlanServiceEndpointMethodFilter

type PackagePlanServiceEndpointMethodFilter struct {
	ResponseFilter

	PackagePlanServiceEndpointMethod PackagePlanServiceEndpointMethodIdentifier `json:"-"`
}

func (*PackagePlanServiceEndpointMethodFilter) Identifier

type PackagePlanServiceEndpointMethodFilterIdentifier

type PackagePlanServiceEndpointMethodFilterIdentifier struct {
	PackagePlanIdentifier
	ServiceEndpointMethodFilterIdentifier
}

func (PackagePlanServiceEndpointMethodFilterIdentifier) AsPackagePlanServiceEndpointMethodIdentifier

func (ppsemfi PackagePlanServiceEndpointMethodFilterIdentifier) AsPackagePlanServiceEndpointMethodIdentifier() PackagePlanServiceEndpointMethodIdentifier

type PackagePlanServiceEndpointMethodIdentifier

type PackagePlanServiceEndpointMethodIdentifier struct {
	PackagePlanIdentifier
	ServiceEndpointMethodIdentifier
}

func (PackagePlanServiceEndpointMethodIdentifier) GetPackagePlanServiceEndpointIdentifier

func (ppsemi PackagePlanServiceEndpointMethodIdentifier) GetPackagePlanServiceEndpointIdentifier() PackagePlanServiceEndpointIdentifier

type PackagePlanServiceIdentifier

type PackagePlanServiceIdentifier struct {
	PackagePlanIdentifier
	ServiceIdentifier
}

type Plan

type Plan struct {
	AddressableV3Object
	Description                       string `json:"description,omitempty"`
	Eav                               *EAV   `json:"eav,omitempty"`
	SelfServiceKeyProvisioningEnabled bool   `json:"selfServiceKeyProvisioningEnabled"`
	AdminKeyProvisioningEnabled       bool   `json:"adminKeyProvisioningEnabled"`
	Notes                             string `json:"notes,omitempty"`
	MaxNumKeysAllowed                 int    `json:"maxNumKeysAllowed"`
	NumKeysBeforeReview               int    `json:"numKeysBeforeReview"`
	QpsLimitCeiling                   *int64 `json:"qpsLimitCeiling,omitempty"`
	QpsLimitExempt                    bool   `json:"qpsLimitExempt"`
	QpsLimitKeyOverrideAllowed        bool   `json:"qpsLimitKeyOverrideAllowed"`
	RateLimitCeiling                  *int64 `json:"rateLimitCeiling,omitempty"`
	RateLimitExempt                   bool   `json:"rateLimitExempt"`
	RateLimitKeyOverrideAllowed       bool   `json:"rateLimitKeyOverrideAllowed"`
	RateLimitPeriod                   string `json:"rateLimitPeriod,omitempty"`
	ResponseFilterOverrideAllowed     bool   `json:"responseFilterOverrideAllowed"`
	Status                            string `json:"status,omitempty"`
	// Mashery's documentation erroneously quotes this field
	// as int. It is actually UUID of the email template set Id.
	// Null values are essential to disable notifications.
	EmailTemplateSetId      *string           `json:"emailTemplateSetId"`
	AdminEmailTemplateSetId *int              `json:"adminEmailTemplateSetId"`
	Services                *[]Service        `json:"services,omitempty"`
	Roles                   *[]RolePermission `json:"roles,omitempty"`

	// Identity of the context object
	ParentPackageId PackageIdentifier `json:"-"`
}

func (*Plan) Identifier

func (p *Plan) Identifier() PackagePlanIdentifier

type PlanFilter

type PlanFilter struct {
	AddressableV3Object
	Notes            string `json:"notes"`
	XmlFilterFields  string `json:"xmlFilterFields"`
	JsonFilterFields string `json:"jsonFilterFields"`
}

type Processor

type Processor struct {
	PreProcessEnabled  bool              `json:"preProcessEnabled"`
	PostProcessEnabled bool              `json:"postProcessEnabled"`
	PostInputs         map[string]string `json:"postInputs"`
	PreInputs          map[string]string `json:"preInputs"`
	Adapter            string            `json:"adapter"`
}

func (*Processor) IsEmpty

func (p *Processor) IsEmpty() bool

Checks if the pre-processor structure is empty, i.e. doesn't convey any adapter information.

type ResponseFilter

type ResponseFilter struct {
	AddressableV3Object
	Notes            string `json:"notes"`
	XmlFilterFields  string `json:"xmlFilterFields,omitempty"`
	JsonFilterFields string `json:"jsonFilterFields,omitempty"`
}

type Role

type Role struct {
	AddressableV3Object
	Description string `json:"description,omitempty"`
	Predefined  bool   `json:"isPredefined,omitempty"`
	OrgRole     bool   `json:"isOrgrole,omitempty"`
	Assignable  bool   `json:"isAssignable,omitempty"`
}

type RolePermission

type RolePermission struct {
	Role
	Action string `json:"action"`
}

type ScheduledMaintenanceEvent

type ScheduledMaintenanceEvent struct {
	Id            string                `json:"id"`
	Name          string                `json:"name"`
	StartDateTime MasheryJSONTime       `json:"startDateTime"`
	EndDateTime   MasheryJSONTime       `json:"endDateTime"`
	Endpoints     []AddressableV3Object `json:"endpoints"`
}

type Service

type Service struct {
	AddressableV3Object
	Cache             *ServiceCache           `json:"cache,omitempty"`
	Endpoints         []Endpoint              `json:"endpoints,omitempty"`
	EditorHandle      string                  `json:"editorHandle,omitempty"`
	RevisionNumber    int                     `json:"revisionNumber,omitempty"`
	RobotsPolicy      string                  `json:"robotsPolicy,omitempty"`
	CrossdomainPolicy string                  `json:"crossdomainPolicy,omitempty"`
	Description       string                  `json:"description,omitempty"`
	ErrorSets         *[]ErrorSet             `json:"errorSets,omitempty"`
	QpsLimitOverall   *int64                  `json:"qpsLimitOverall,omitempty"`
	RFC3986Encode     bool                    `json:"rfc3986Encode,omitempty"`
	SecurityProfile   *MasherySecurityProfile `json:"securityProfile,omitempty"`
	Version           string                  `json:"version,omitempty"`
	Roles             *[]RolePermission       `json:"roles,omitempty"`
	Organization      *Organization           `json:"organization"`
}

func (*Service) AddressableEndpoints

func (m *Service) AddressableEndpoints() []AddressableV3Object

func (*Service) Identifier

func (s *Service) Identifier() ServiceIdentifier

type ServiceCache

type ServiceCache struct {
	CacheTtl float64 `json:"cacheTtl"`

	ParentServiceId ServiceIdentifier `json:"-"`
}

type ServiceEndpoint

type ServiceEndpoint struct {
	ServiceId  string
	EndpointId string
}

type ServiceEndpointIdentifier

type ServiceEndpointIdentifier struct {
	ServiceIdentifier
	EndpointId string `json:"eid"`
}

func ServiceEndpointIdentityFrom

func ServiceEndpointIdentityFrom(svcId, endpointId string) ServiceEndpointIdentifier

type ServiceEndpointMethod

type ServiceEndpointMethod struct {
	BaseMethod
	ParentEndpointId ServiceEndpointIdentifier `json:"-"`
}

func (*ServiceEndpointMethod) Identifier

type ServiceEndpointMethodFilter

type ServiceEndpointMethodFilter struct {
	ResponseFilter

	ServiceEndpointMethod ServiceEndpointMethodIdentifier `json:"-"`
}

func (*ServiceEndpointMethodFilter) Identifier

type ServiceEndpointMethodFilterIdentifier

type ServiceEndpointMethodFilterIdentifier struct {
	ServiceEndpointMethodIdentifier
	FilterId string `json:"fid"`
}

func ServiceEndpointMethodFilterIdentityFrom

func ServiceEndpointMethodFilterIdentityFrom(svcId, endpId, methId, filterId string) ServiceEndpointMethodFilterIdentifier

type ServiceEndpointMethodIdentifier

type ServiceEndpointMethodIdentifier struct {
	ServiceEndpointIdentifier
	MethodId string `json:"mthid"`
}

func ServiceEndpointMethodIdentityFrom

func ServiceEndpointMethodIdentityFrom(svcId, endpId, methId string) ServiceEndpointMethodIdentifier

type ServiceIdentifier

type ServiceIdentifier struct {
	ServiceId string `json:"sid"`
}

func ServiceIdentityFrom

func ServiceIdentityFrom(id string) ServiceIdentifier

type ServiceMethod

type ServiceMethod struct {
	ServiceEndpoint
	MethodId string
}

type ServiceMethodFilter

type ServiceMethodFilter struct {
	ServiceMethod
	FilterId string
}

type SystemDomainAuthentication

type SystemDomainAuthentication struct {
	Type        string  `json:"type"`
	Username    *string `json:"username"`
	Certificate *string `json:"certificate"`
	Password    *string `json:"password"`
}

type TimedAccessTokenResponse

type TimedAccessTokenResponse struct {
	Obtained   time.Time `json:"obtained"`
	ServerTime time.Time `json:"-"`
	QPS        int       `json:"qps"`
	AccessTokenResponse
}

TimedAccessTokenResponse Timed access token response, suitable for storing in a log file.

func (*TimedAccessTokenResponse) Expired

func (t *TimedAccessTokenResponse) Expired() bool

func (*TimedAccessTokenResponse) ExpiryTime

func (t *TimedAccessTokenResponse) ExpiryTime() time.Time

func (*TimedAccessTokenResponse) TimeLeft

func (t *TimedAccessTokenResponse) TimeLeft() int

TimeLeft Returns number of seconds that are still left in this access tokens.

type V3GenericErrorResponse

type V3GenericErrorResponse struct {
	ErrorCode    string `json:"errorCode"`
	ErrorMessage string `json:"errorMessage"`
}

func (*V3GenericErrorResponse) Error

func (e *V3GenericErrorResponse) Error() string

func (*V3GenericErrorResponse) HasData

func (e *V3GenericErrorResponse) HasData() bool

type V3PropertyErrorMessage

type V3PropertyErrorMessage struct {
	Property string `json:"property"`
	Message  string `json:"message"`
}

type V3PropertyErrorMessages

type V3PropertyErrorMessages struct {
	Errors []V3PropertyErrorMessage `json:"errors"`
}

func (*V3PropertyErrorMessages) Error

func (e *V3PropertyErrorMessages) Error() string

type V3UndeterminedError

type V3UndeterminedError struct {
	Code   int
	Header http.Header
	Body   []byte
}

func (*V3UndeterminedError) Error

func (e *V3UndeterminedError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL