Documentation ¶
Index ¶
- Constants
- Variables
- func AccessTokenFromContext(ctx context.Context) string
- func CheckPlanEndpointExists(ctx context.Context, ...) (bool, error)
- func CheckPlanServiceExists(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, ...) (bool, error)
- func ContextWithAccessToken(ctx context.Context, token string) context.Context
- func CountPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, ...) (int64, error)
- func CountPlanService(ctx context.Context, ident masherytypes.PackagePlanIdentifier, ...) (int64, error)
- func CreatePackagePlanMethodFilter(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethodFilter, error)
- func CreatePackagePlanServiceEndpointMethod(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethod, error)
- func CreatePlanEndpoint(ctx context.Context, ...) (masherytypes.AddressableV3Object, error)
- func CreatePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, ...) (masherytypes.AddressableV3Object, error)
- func DefaultCredentialsFile() string
- func DefaultGetFieldsFromContext(defaultFields []string) func(context.Context) []string
- func DefaultSavedAccessTokenFilePath() string
- func DeletePackagePlanMethod(ctx context.Context, ...) error
- func DeletePlanEndpoint(ctx context.Context, ...) error
- func DeletePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, ...) error
- func DeleteServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, ...) error
- func EncryptInPlace(path string, pass string) error
- func GetApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, ...) (map[string]string, error)
- func GetApplicationWithExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, ...) (masherytypes.Application, bool, error)
- func GetPackagePlanMethod(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethod, bool, error)
- func GetServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, ...) ([]masherytypes.RolePermission, bool, error)
- func ListPackagePlanMethods(ctx context.Context, id masherytypes.PackagePlanServiceEndpointIdentifier, ...) ([]masherytypes.PackagePlanServiceEndpointMethod, error)
- func ListPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, ...) ([]masherytypes.AddressableV3Object, error)
- func ListPlanServices(ctx context.Context, ident masherytypes.PackagePlanIdentifier, ...) ([]masherytypes.Service, error)
- func LoadV3TokenResponse(path string) (*masherytypes.TimedAccessTokenResponse, error)
- func PersistV3TokenResponse(dat *masherytypes.TimedAccessTokenResponse, path string) error
- func ReadCiphertext(fileName string, pass string) ([]byte, error)
- func ReadSavedV3TokenData(fp string) (*masherytypes.TimedAccessTokenResponse, error)
- func ResetPackageOwnership(ctx context.Context, pack masherytypes.PackageIdentifier, ...) (masherytypes.Package, error)
- func ResponseDate(resp *http.Response) time.Time
- func ReturnFields(ctx context.Context, v []string) context.Context
- func RootCreator[TParent, T any](creator CRUDCreator[TParent, T], rootIdent TParent) func(ctx context.Context, t T, c *transport.HttpTransport) (T, error)
- func RootFetcher[TParent, T any](fetcher CRUDAllFetcher[TParent, T], rootIdent TParent) func(ctx context.Context, c *transport.HttpTransport) ([]T, error)
- func RootFilteredCounter[TParent, T any](counter CRUDFilteredCounter[TParent, T], rootIdent TParent) ...
- func RootFilteredFetcher[TParent, T any](fetcher CRUDFilteredFetcher[TParent, T], rootIdent TParent) ...
- func SetServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, ...) error
- func UpdateApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, ...) (map[string]string, error)
- type AsyncFetchResult
- type BiConsumer
- type BiConsumerCanErr
- type BiConsumerCanErrLocator
- type BiExchangeFunc
- type CRUDAllFetcher
- type CRUDCreator
- type CRUDFilteredCounter
- type CRUDFilteredFetcher
- type CRUDGetter
- type Client
- type ClientCredentialsProvider
- func (lcp *ClientCredentialsProvider) AccessToken(_ context.Context) (string, error)
- func (lcp *ClientCredentialsProvider) Close()
- func (lcp *ClientCredentialsProvider) EnsureRefresh()
- func (lcp *ClientCredentialsProvider) HeaderAuthorization(ctx context.Context) (map[string]string, error)
- func (lcp *ClientCredentialsProvider) OnPostRefresh(f func())
- func (lcp *ClientCredentialsProvider) QueryStringAuthorization(_ context.Context) (map[string]string, error)
- func (lcp *ClientCredentialsProvider) Refresh() error
- func (lcp *ClientCredentialsProvider) TokenData() (*masherytypes.TimedAccessTokenResponse, error)
- type ClientMethodSchema
- type Consumer
- type ContextTokenProvider
- func (f *ContextTokenProvider) AccessToken(ctx context.Context) (string, error)
- func (f *ContextTokenProvider) Close()
- func (f *ContextTokenProvider) HeaderAuthorization(ctx context.Context) (map[string]string, error)
- func (f *ContextTokenProvider) QueryStringAuthorization(_ context.Context) (map[string]string, error)
- type ExchangeBoolFunc
- type ExchangeFunc
- type FileSystemTokenProvider
- type FixedSchemeClient
- type FixedTokenProvider
- func (f *FixedTokenProvider) AccessToken(_ context.Context) (string, error)
- func (f *FixedTokenProvider) Close()
- func (f *FixedTokenProvider) HeaderAuthorization(_ context.Context) (map[string]string, error)
- func (f *FixedTokenProvider) QueryStringAuthorization(_ context.Context) (map[string]string, error)
- func (f *FixedTokenProvider) UpdateToken(tkn string)
- type GenericCRUD
- func (crud *GenericCRUD[TParent, TIdent, T]) Count(ctx context.Context, id TParent, c *transport.HttpTransport) (int64, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) CountFiltered(ctx context.Context, id TParent, filter map[string]string, ...) (int64, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) Create(ctx context.Context, ident TParent, upsert T, c *transport.HttpTransport) (T, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) Delete(ctx context.Context, id TIdent, c *transport.HttpTransport) error
- func (crud *GenericCRUD[TParent, TIdent, T]) Exists(ctx context.Context, ident TIdent, c *transport.HttpTransport) (bool, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) FetchAll(ctx context.Context, id TParent, c *transport.HttpTransport) ([]T, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) FetchAllAsAddressable(ctx context.Context, id TParent, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) FetchAllAsAddressableFiltered(ctx context.Context, id TParent, filter map[string]string, ...) ([]masherytypes.AddressableV3Object, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) FetchFiltered(ctx context.Context, id TParent, filter map[string]string, ...) ([]T, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) Get(ctx context.Context, ident TIdent, c *transport.HttpTransport) (T, bool, error)
- func (crud *GenericCRUD[TParent, TIdent, T]) StubValue() T
- func (crud *GenericCRUD[TParent, TIdent, T]) Update(ctx context.Context, upsert T, c *transport.HttpTransport) (T, error)
- type GenericCRUDDecorator
- type MasheryV3Credentials
- type OAuthHelperParams
- type OrganizationCRUDDecorator
- type Params
- type PluggableClient
- func (c *PluggableClient) AssumeSchema(sch *ClientMethodSchema)
- func (c *PluggableClient) CheckPlanEndpointExists(ctx context.Context, ...) (bool, error)
- func (c *PluggableClient) CheckPlanServiceExists(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (bool, error)
- func (c *PluggableClient) CountApplicationPackageKeys(ctx context.Context, appId masherytypes.ApplicationIdentifier) (int64, error)
- func (c *PluggableClient) CountApplicationsOfMember(ctx context.Context, memberId masherytypes.MemberIdentifier) (int64, error)
- func (c *PluggableClient) CountEndpointsMethodsFiltersOf(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) (int64, error)
- func (c *PluggableClient) CountEndpointsMethodsOf(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) (int64, error)
- func (c *PluggableClient) CountEndpointsOf(ctx context.Context, serviceId masherytypes.ServiceIdentifier) (int64, error)
- func (c *PluggableClient) CountPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (int64, error)
- func (c *PluggableClient) CountPlanService(ctx context.Context, ident masherytypes.PackagePlanIdentifier) (int64, error)
- func (c *PluggableClient) CountPlans(ctx context.Context, packageId masherytypes.PackageIdentifier) (int64, error)
- func (c *PluggableClient) CountServices(ctx context.Context, params map[string]string) (int64, error)
- func (c *PluggableClient) CreateApplication(ctx context.Context, memberId masherytypes.MemberIdentifier, ...) (masherytypes.Application, error)
- func (c *PluggableClient) CreateApplicationPackageKey(ctx context.Context, appId masherytypes.ApplicationIdentifier, ...) (masherytypes.ApplicationPackageKey, error)
- func (c *PluggableClient) CreateEndpoint(ctx context.Context, serviceId masherytypes.ServiceIdentifier, ...) (masherytypes.Endpoint, error)
- func (c *PluggableClient) CreateEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, ...) (masherytypes.ServiceEndpointMethod, error)
- func (c *PluggableClient) CreateEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, ...) (masherytypes.ServiceEndpointMethodFilter, error)
- func (c *PluggableClient) CreateErrorSet(ctx context.Context, serviceId masherytypes.ServiceIdentifier, ...) (masherytypes.ErrorSet, error)
- func (c *PluggableClient) CreateMember(ctx context.Context, member masherytypes.Member) (masherytypes.Member, error)
- func (c *PluggableClient) CreatePackage(ctx context.Context, pack masherytypes.Package) (masherytypes.Package, error)
- func (c *PluggableClient) CreatePackageKey(ctx context.Context, packageKey masherytypes.PackageKey) (masherytypes.PackageKey, error)
- func (c *PluggableClient) CreatePackagePlanMethod(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethod, error)
- func (c *PluggableClient) CreatePackagePlanMethodFilter(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethodFilter, error)
- func (c *PluggableClient) CreatePlan(ctx context.Context, packageId masherytypes.PackageIdentifier, ...) (masherytypes.Plan, error)
- func (c *PluggableClient) CreatePlanEndpoint(ctx context.Context, ...) (masherytypes.AddressableV3Object, error)
- func (c *PluggableClient) CreatePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (masherytypes.AddressableV3Object, error)
- func (c *PluggableClient) CreateService(ctx context.Context, service masherytypes.Service) (masherytypes.Service, error)
- func (c *PluggableClient) CreateServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier, ...) (masherytypes.ServiceCache, error)
- func (c *PluggableClient) CreateServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier, ...) (masherytypes.MasheryOAuth, error)
- func (c *PluggableClient) DeleteApplication(ctx context.Context, appId masherytypes.ApplicationIdentifier) error
- func (c *PluggableClient) DeleteApplicationPackageKey(ctx context.Context, keyId masherytypes.ApplicationPackageKeyIdentifier) error
- func (c *PluggableClient) DeleteEndpoint(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) error
- func (c *PluggableClient) DeleteEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) error
- func (c *PluggableClient) DeleteEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier) error
- func (c *PluggableClient) DeleteErrorSet(ctx context.Context, ident masherytypes.ErrorSetIdentifier) error
- func (c *PluggableClient) DeleteMember(ctx context.Context, memberId masherytypes.MemberIdentifier) error
- func (c *PluggableClient) DeletePackage(ctx context.Context, packId masherytypes.PackageIdentifier) error
- func (c *PluggableClient) DeletePackageKey(ctx context.Context, keyId masherytypes.PackageKeyIdentifier) error
- func (c *PluggableClient) DeletePackagePlanMethod(ctx context.Context, ...) error
- func (c *PluggableClient) DeletePackagePlanMethodFilter(ctx context.Context, ...) error
- func (c *PluggableClient) DeletePlan(ctx context.Context, ident masherytypes.PackagePlanIdentifier) error
- func (c *PluggableClient) DeletePlanEndpoint(ctx context.Context, ...) error
- func (c *PluggableClient) DeletePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) error
- func (c *PluggableClient) DeleteService(ctx context.Context, serviceId masherytypes.ServiceIdentifier) error
- func (c *PluggableClient) DeleteServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier) error
- func (c *PluggableClient) DeleteServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier) error
- func (c *PluggableClient) DeleteServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier) error
- func (c *PluggableClient) GetApplication(ctx context.Context, appId masherytypes.ApplicationIdentifier) (masherytypes.Application, bool, error)
- func (c *PluggableClient) GetApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier) (map[string]string, error)
- func (c *PluggableClient) GetApplicationPackageKey(ctx context.Context, id masherytypes.ApplicationPackageKeyIdentifier) (masherytypes.ApplicationPackageKey, bool, error)
- func (c *PluggableClient) GetApplicationPackageKeys(ctx context.Context, appId masherytypes.ApplicationIdentifier) ([]masherytypes.ApplicationPackageKey, error)
- func (c *PluggableClient) GetEmailTemplateSet(ctx context.Context, id string) (masherytypes.EmailTemplateSet, bool, error)
- func (c *PluggableClient) GetEndpoint(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) (masherytypes.Endpoint, bool, error)
- func (c *PluggableClient) GetEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) (masherytypes.ServiceEndpointMethod, bool, error)
- func (c *PluggableClient) GetEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier) (masherytypes.ServiceEndpointMethodFilter, bool, error)
- func (c *PluggableClient) GetErrorSet(ctx context.Context, ident masherytypes.ErrorSetIdentifier) (masherytypes.ErrorSet, bool, error)
- func (c *PluggableClient) GetFullApplication(ctx context.Context, id masherytypes.ApplicationIdentifier) (masherytypes.Application, bool, error)
- func (c *PluggableClient) GetFullMember(ctx context.Context, id masherytypes.MemberIdentifier) (masherytypes.Member, bool, error)
- func (c *PluggableClient) GetMember(ctx context.Context, id masherytypes.MemberIdentifier) (masherytypes.Member, bool, error)
- func (c *PluggableClient) GetPackage(ctx context.Context, id masherytypes.PackageIdentifier) (masherytypes.Package, bool, error)
- func (c *PluggableClient) GetPackageKey(ctx context.Context, id masherytypes.PackageKeyIdentifier) (masherytypes.PackageKey, bool, error)
- func (c *PluggableClient) GetPackagePlanMethod(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethod, bool, error)
- func (c *PluggableClient) GetPackagePlanMethodFilter(ctx context.Context, ...) (masherytypes.PackagePlanServiceEndpointMethodFilter, bool, error)
- func (c *PluggableClient) GetPlan(ctx context.Context, ident masherytypes.PackagePlanIdentifier) (masherytypes.Plan, bool, error)
- func (c *PluggableClient) GetPublicDomains(ctx context.Context) ([]masherytypes.DomainAddress, error)
- func (c *PluggableClient) GetRole(ctx context.Context, id string) (masherytypes.Role, bool, error)
- func (c *PluggableClient) GetService(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.Service, bool, error)
- func (c *PluggableClient) GetServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.ServiceCache, bool, error)
- func (c *PluggableClient) GetServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.MasheryOAuth, bool, error)
- func (c *PluggableClient) GetServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.RolePermission, bool, error)
- func (c *PluggableClient) GetSystemDomains(ctx context.Context) ([]masherytypes.DomainAddress, error)
- func (c *PluggableClient) ListApplications(ctx context.Context) ([]masherytypes.Application, error)
- func (c *PluggableClient) ListApplicationsFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Application, error)
- func (c *PluggableClient) ListEmailTemplateSets(ctx context.Context) ([]masherytypes.EmailTemplateSet, error)
- func (c *PluggableClient) ListEmailTemplateSetsFiltered(ctx context.Context, params map[string]string) ([]masherytypes.EmailTemplateSet, error)
- func (c *PluggableClient) ListEndpointMethodFilters(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) ([]masherytypes.AddressableV3Object, error)
- func (c *PluggableClient) ListEndpointMethodFiltersWithFullInfo(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) ([]masherytypes.ServiceEndpointMethodFilter, error)
- func (c *PluggableClient) ListEndpointMethods(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) ([]masherytypes.AddressableV3Object, error)
- func (c *PluggableClient) ListEndpointMethodsWithFullInfo(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) ([]masherytypes.ServiceEndpointMethod, error)
- func (c *PluggableClient) ListEndpoints(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.AddressableV3Object, error)
- func (c *PluggableClient) ListEndpointsWithFullInfo(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.Endpoint, error)
- func (c *PluggableClient) ListErrorSets(ctx context.Context, serviceId masherytypes.ServiceIdentifier, ...) ([]masherytypes.ErrorSet, error)
- func (c *PluggableClient) ListMembers(ctx context.Context) ([]masherytypes.Member, error)
- func (c *PluggableClient) ListMembersFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Member, error)
- func (c *PluggableClient) ListOrganizations(ctx context.Context) ([]masherytypes.Organization, error)
- func (c *PluggableClient) ListOrganizationsFiltered(ctx context.Context, qs map[string]string) ([]masherytypes.Organization, error)
- func (c *PluggableClient) ListPackageKeys(ctx context.Context) ([]masherytypes.PackageKey, error)
- func (c *PluggableClient) ListPackageKeysFiltered(ctx context.Context, params map[string]string) ([]masherytypes.PackageKey, error)
- func (c *PluggableClient) ListPackagePlanMethods(ctx context.Context, id masherytypes.PackagePlanServiceEndpointIdentifier) ([]masherytypes.PackagePlanServiceEndpointMethod, error)
- func (c *PluggableClient) ListPackages(ctx context.Context) ([]masherytypes.Package, error)
- func (c *PluggableClient) ListPackagesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Package, error)
- func (c *PluggableClient) ListPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) ([]masherytypes.AddressableV3Object, error)
- func (c *PluggableClient) ListPlanServices(ctx context.Context, ident masherytypes.PackagePlanIdentifier) ([]masherytypes.Service, error)
- func (c *PluggableClient) ListPlans(ctx context.Context, packageId masherytypes.PackageIdentifier) ([]masherytypes.Plan, error)
- func (c *PluggableClient) ListPlansFiltered(ctx context.Context, packageId masherytypes.PackageIdentifier, ...) ([]masherytypes.Plan, error)
- func (c *PluggableClient) ListRoles(ctx context.Context) ([]masherytypes.Role, error)
- func (c *PluggableClient) ListRolesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Role, error)
- func (c *PluggableClient) ListServices(ctx context.Context) ([]masherytypes.Service, error)
- func (c *PluggableClient) ListServicesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Service, error)
- func (c *PluggableClient) ResetPackageOwnership(ctx context.Context, pack masherytypes.PackageIdentifier) (masherytypes.Package, error)
- func (c *PluggableClient) SetServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier, ...) error
- func (c *PluggableClient) UpdateApplication(ctx context.Context, app masherytypes.Application) (masherytypes.Application, error)
- func (c *PluggableClient) UpdateApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, ...) (map[string]string, error)
- func (c *PluggableClient) UpdateApplicationPackageKey(ctx context.Context, packageKey masherytypes.ApplicationPackageKey) (masherytypes.ApplicationPackageKey, error)
- func (c *PluggableClient) UpdateEndpoint(ctx context.Context, endp masherytypes.Endpoint) (masherytypes.Endpoint, error)
- func (c *PluggableClient) UpdateEndpointMethod(ctx context.Context, methUpsert masherytypes.ServiceEndpointMethod) (masherytypes.ServiceEndpointMethod, error)
- func (c *PluggableClient) UpdateEndpointMethodFilter(ctx context.Context, filterUpsert masherytypes.ServiceEndpointMethodFilter) (masherytypes.ServiceEndpointMethodFilter, error)
- func (c *PluggableClient) UpdateErrorSet(ctx context.Context, setData masherytypes.ErrorSet) (masherytypes.ErrorSet, error)
- func (c *PluggableClient) UpdateErrorSetMessage(ctx context.Context, msg masherytypes.MasheryErrorMessage) (masherytypes.MasheryErrorMessage, error)
- func (c *PluggableClient) UpdateMember(ctx context.Context, member masherytypes.Member) (masherytypes.Member, error)
- func (c *PluggableClient) UpdatePackage(ctx context.Context, pack masherytypes.Package) (masherytypes.Package, error)
- func (c *PluggableClient) UpdatePackageKey(ctx context.Context, packageKey masherytypes.PackageKey) (masherytypes.PackageKey, error)
- func (c *PluggableClient) UpdatePlan(ctx context.Context, plan masherytypes.Plan) (masherytypes.Plan, error)
- func (c *PluggableClient) UpdateService(ctx context.Context, service masherytypes.Service) (masherytypes.Service, error)
- func (c *PluggableClient) UpdateServiceCache(ctx context.Context, service masherytypes.ServiceCache) (masherytypes.ServiceCache, error)
- func (c *PluggableClient) UpdateServiceOAuthSecurityProfile(ctx context.Context, service masherytypes.MasheryOAuth) (masherytypes.MasheryOAuth, error)
- type Supplier
- type SupplierCanErr
- type V3AccessTokenProvider
- type V3OAuthHelper
- type WildcardClient
- type WildcardClientImpl
- func (w *WildcardClientImpl) Close(ctx context.Context)
- func (w *WildcardClientImpl) DeleteAny(ctx context.Context, resource string) (*transport.WrappedResponse, error)
- func (w *WildcardClientImpl) FetchAny(ctx context.Context, resource string, qs *url.Values) (*transport.WrappedResponse, error)
- func (w *WildcardClientImpl) PostAny(ctx context.Context, resource string, body interface{}) (*transport.WrappedResponse, error)
- func (w *WildcardClientImpl) PutAny(ctx context.Context, resource string, body interface{}) (*transport.WrappedResponse, error)
Constants ¶
const ( MasheryTokenSystemProperty = "MasheryV3AccessToken" MasheryTokenEndpoint = "https://api.mashery.com/v3/token" )
const AccessTokenEnv = "MASHERY_V3_TOKEN"
const ApiKeyEnv = "MASHERY_V3API_KEY"
const ApiKeySecretEnv = "MASHERY_V3API_SECRET"
const AreaIdEnv = "MASHERY_AREA_ID"
const PackagePlanMethodAppCtx = "package plan method"
const PackagePlanMethodFilterAppCtx = "package plan method filter"
const UserNameEnv = "MASHERY_USER"
const UserPassEnv = "MASHERY_PASS"
Variables ¶
var EmptyQuery = map[string]string{}
var MasheryApplicationPackageKeyFields = append(MasheryPackageKeyFields,
"package", "plan")
var MasheryEmailTemplateSetFields = []string{"id", "created", "updated", "name", "type", "emailTemplates"}
var MasheryEmailTemplateSetFieldsStr = strings.Join(MasheryEmailTemplateSetFields, ",")
var MasheryEndpointFields = []string{
"id", "allowMissingApiKey", "apiKeyValueLocationKey", "apiKeyValueLocations",
"apiMethodDetectionKey", "apiMethodDetectionLocations", "cache", "connectionTimeoutForSystemDomainRequest",
"connectionTimeoutForSystemDomainResponse", "cookiesDuringHttpRedirectsEnabled", "cors",
"created", "customRequestAuthenticationAdapter", "dropApiKeyFromIncomingCall", "forceGzipOfBackendCall",
"gzipPassthroughSupportEnabled", "headersToExcludeFromIncomingCall", "highSecurity",
"hostPassthroughIncludedInBackendCallHeader", "inboundSslRequired", "inboundMsslRequired", "jsonpCallbackParameter",
"jsonpCallbackParameterValue", "scheduledMaintenanceEvent", "forwardedHeaders", "returnedHeaders",
"methods", "name", "numberOfHttpRedirectsToFollow", "outboundRequestTargetPath", "outboundRequestTargetQueryParameters",
"outboundTransportProtocol", "processor", "publicDomains", "requestAuthenticationType",
"requestPathAlias", "requestProtocol", "oauthGrantTypes", "stringsToTrimFromApiKey", "supportedHttpMethods",
"systemDomainAuthentication", "systemDomains", "trafficManagerDomain", "updated", "useSystemDomainCredentials",
"systemDomainCredentialKey", "systemDomainCredentialSecret",
"errorSet", "userControlledErrorLocation", "userControlledErrorLocationKey",
}
var MasheryEndpointFieldsStr = strings.Join(MasheryEndpointFields, ",")
var MasheryErrorSetFields = []string{
"id", "name", "type", "jsonp", "jsonpType", "errorMessages",
}
MasheryErrorSetFields all fields of Mashery error set
var MasheryMethodsFields = []string{"id", "name", "created", "updated", "sampleJsonResponse", "sampleXmlResponse"}
var MasheryMethodsFieldsStr = strings.Join(MasheryMethodsFields, ",")
var MasheryPackageFields = []string{
"id", "name", "created", "updated", "description", "notifyDeveloperPeriod",
"notifyDeveloperNearQuota", "notifyDeveloperOverQuota", "notifyDeveloperOverThrottle", "notifyAdminNearQuota",
"notifyAdminPeriod", "notifyAdminOverQuota", "notifyAdminOverThrottle", "notifyAdminEmails",
"nearQuotaThreshold", "eav", "keyAdapter", "keyLength",
"sharedSecretLength", "plans", "organization",
}
var MasheryPackageFieldsStr = strings.Join(MasheryPackageFields, ",")
var MasheryPackageKeyFields = []string{
"id", "apikey", "secret", "created", "updated", "rateLimitCeiling", "rateLimitExempt", "qpsLimitCeiling",
"qpsLimitExempt", "status", "limits",
}
var MasheryPackageKeyFieldsStr = strings.Join(MasheryPackageKeyFields, ",")
var MasheryPackageKeyFullFields = append(MasheryPackageKeyFields, "package", "plan")
var MasheryPackageKeyFullFieldsStr = strings.Join(MasheryPackageKeyFullFields, ",")
var MasheryPlanFields = []string{
"id", "created", "updated", "name", "description", "eav", "selfServiceKeyProvisioningEnabled",
"adminKeyProvisioningEnabled", "notes", "maxNumKeysAllowed", "numKeysBeforeReview", "qpsLimitCeiling", "qpsLimitExempt",
"qpsLimitKeyOverrideAllowed", "rateLimitCeiling", "rateLimitExempt", "rateLimitKeyOverrideAllowed", "rateLimitPeriod",
"responseFilterOverrideAllowed", "status", "emailTemplateSetId", "adminEmailTemplateSetId",
"services.id", "services.endpoints", "roles",
}
var MasheryPlanFieldsStr = strings.Join(MasheryPlanFields, ",")
var MasheryResponseFilterFields = []string{"id", "name", "created", "updated", "notes", "notes", "xmlFilterFields", "jsonFilterFields"}
var MasheryResponseFilterFieldsStr = strings.Join(MasheryResponseFilterFields, ",")
var MasheryServiceFields = []string{
"id", "name", "created", "updated", "editorHandle", "revisionNumber", "robotsPolicy",
"crossdomainPolicy", "description", "errorSets", "qpsLimitOverall", "rfc3986Encode",
"securityProfile", "version", "cache", "organization",
}
MasheryServiceFields Usual mashery service fields without endpoints
var MasheryServiceFieldsWithEndpoinds = append(MasheryServiceFields, "endpoints")
var MasheryServiceFullFieldsStr = strings.Join(MasheryServiceFieldsWithEndpoinds, ",")
Joined strings, representing all fields of Mashery service. Used (frequently) in {@link HttpTransport#GetService}
Functions ¶
func AccessTokenFromContext ¶
func CheckPlanEndpointExists ¶
func CheckPlanEndpointExists(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) (bool, error)
func CheckPlanServiceExists ¶
func CheckPlanServiceExists(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) (bool, error)
func ContextWithAccessToken ¶
func CountPlanEndpoints ¶
func CountPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) (int64, error)
func CountPlanService ¶
func CountPlanService(ctx context.Context, ident masherytypes.PackagePlanIdentifier, c *transport.HttpTransport) (int64, error)
func CreatePackagePlanMethodFilter ¶
func CreatePackagePlanMethodFilter(ctx context.Context, ident masherytypes.PackagePlanServiceEndpointMethodFilterIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethodFilter, error)
CreatePackagePlanMethodFilter Create a new service cache
func CreatePackagePlanServiceEndpointMethod ¶
func CreatePackagePlanServiceEndpointMethod(ctx context.Context, ident masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethod, error)
CreatePackagePlanServiceEndpointMethod Create a new service cache
func CreatePlanEndpoint ¶
func CreatePlanEndpoint(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) (masherytypes.AddressableV3Object, error)
func CreatePlanService ¶
func CreatePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) (masherytypes.AddressableV3Object, error)
func DefaultCredentialsFile ¶
func DefaultCredentialsFile() string
func DefaultSavedAccessTokenFilePath ¶
func DefaultSavedAccessTokenFilePath() string
func DeletePackagePlanMethod ¶
func DeletePackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) error
DeletePackagePlanMethod Create a new service.
func DeletePlanEndpoint ¶
func DeletePlanEndpoint(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) error
func DeletePlanService ¶
func DeletePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) error
func DeleteServiceRoles ¶
func DeleteServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) error
DeleteServiceRoles delete service roles
func EncryptInPlace ¶
func GetApplicationExtendedAttributes ¶
func GetApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, transport *transport.HttpTransport) (map[string]string, error)
func GetApplicationWithExtendedAttributes ¶
func GetApplicationWithExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, transport *transport.HttpTransport) (masherytypes.Application, bool, error)
func GetPackagePlanMethod ¶
func GetPackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethod, bool, error)
GetPackagePlanMethod Retrieve the information about a package plan method.
func GetServiceRoles ¶
func GetServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) ([]masherytypes.RolePermission, bool, error)
GetServiceRoles retrieve the roles that are attached to this service.
func ListPackagePlanMethods ¶
func ListPackagePlanMethods(ctx context.Context, id masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) ([]masherytypes.PackagePlanServiceEndpointMethod, error)
func ListPlanEndpoints ¶
func ListPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error)
func ListPlanServices ¶
func ListPlanServices(ctx context.Context, ident masherytypes.PackagePlanIdentifier, c *transport.HttpTransport) ([]masherytypes.Service, error)
func LoadV3TokenResponse ¶
func LoadV3TokenResponse(path string) (*masherytypes.TimedAccessTokenResponse, error)
func PersistV3TokenResponse ¶
func PersistV3TokenResponse(dat *masherytypes.TimedAccessTokenResponse, path string) error
func ReadSavedV3TokenData ¶
func ReadSavedV3TokenData(fp string) (*masherytypes.TimedAccessTokenResponse, error)
func ResetPackageOwnership ¶
func ResetPackageOwnership(ctx context.Context, pack masherytypes.PackageIdentifier, c *transport.HttpTransport) (masherytypes.Package, error)
func RootCreator ¶
func RootCreator[TParent, T any](creator CRUDCreator[TParent, T], rootIdent TParent) func(ctx context.Context, t T, c *transport.HttpTransport) (T, error)
func RootFetcher ¶
func RootFetcher[TParent, T any](fetcher CRUDAllFetcher[TParent, T], rootIdent TParent) func(ctx context.Context, c *transport.HttpTransport) ([]T, error)
RootFetcher builds a fetch-all function that wraps a parent context object. Useful to shorten the signature where the object retrieved is already root, or to enforce a particular parent object context
func RootFilteredCounter ¶
func RootFilteredCounter[TParent, T any](counter CRUDFilteredCounter[TParent, T], rootIdent TParent) func(context.Context, map[string]string, *transport.HttpTransport) (int64, error)
func RootFilteredFetcher ¶
func RootFilteredFetcher[TParent, T any](fetcher CRUDFilteredFetcher[TParent, T], rootIdent TParent) func(context.Context, map[string]string, *transport.HttpTransport) ([]T, error)
func SetServiceRoles ¶
func SetServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, roles []masherytypes.RolePermission, c *transport.HttpTransport) error
SetServiceRoles set service roles for the given service. Empty array effectively deletes all associated roles.
func UpdateApplicationExtendedAttributes ¶
func UpdateApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, params map[string]string, transport *transport.HttpTransport) (map[string]string, error)
Types ¶
type AsyncFetchResult ¶
type BiConsumer ¶
type BiConsumer[T1, T2 any] func(t1 T1, t2 T2)
type BiConsumerCanErr ¶
type BiConsumerCanErrLocator ¶
type BiConsumerCanErrLocator[TInA, TInB any] func(cl Client) BiConsumerCanErr[TInA, TInB]
type BiExchangeFunc ¶
type CRUDAllFetcher ¶
type CRUDCreator ¶
type CRUDFilteredCounter ¶
type CRUDFilteredFetcher ¶
type CRUDGetter ¶
type CRUDGetter[TIdent, T any] func(ctx context.Context, ident TIdent, c *transport.HttpTransport) (T, bool, error)
func GetWithFields ¶
func GetWithFields[TIdent, T any](fields []string, getter CRUDGetter[TIdent, T]) CRUDGetter[TIdent, T]
type Client ¶
type Client interface { // GetPublicDomains Get public domains in this area GetPublicDomains(ctx context.Context) ([]masherytypes.DomainAddress, error) GetSystemDomains(ctx context.Context) ([]masherytypes.DomainAddress, error) // GetApplication Retrieve the details of the application GetApplication(ctx context.Context, appId masherytypes.ApplicationIdentifier) (masherytypes.Application, bool, error) GetApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier) (map[string]string, error) UpdateApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, params map[string]string) (map[string]string, error) GetApplicationPackageKeys(ctx context.Context, appId masherytypes.ApplicationIdentifier) ([]masherytypes.ApplicationPackageKey, error) CountApplicationPackageKeys(ctx context.Context, appId masherytypes.ApplicationIdentifier) (int64, error) GetFullApplication(ctx context.Context, id masherytypes.ApplicationIdentifier) (masherytypes.Application, bool, error) CreateApplication(ctx context.Context, memberId masherytypes.MemberIdentifier, app masherytypes.Application) (masherytypes.Application, error) UpdateApplication(ctx context.Context, app masherytypes.Application) (masherytypes.Application, error) DeleteApplication(ctx context.Context, appId masherytypes.ApplicationIdentifier) error CountApplicationsOfMember(ctx context.Context, memberId masherytypes.MemberIdentifier) (int64, error) ListApplications(ctx context.Context) ([]masherytypes.Application, error) ListApplicationsFiltered(ctx context.Context, p map[string]string) ([]masherytypes.Application, error) // Email template sets GetEmailTemplateSet(ctx context.Context, id string) (masherytypes.EmailTemplateSet, bool, error) ListEmailTemplateSets(ctx context.Context) ([]masherytypes.EmailTemplateSet, error) ListEmailTemplateSetsFiltered(ctx context.Context, params map[string]string) ([]masherytypes.EmailTemplateSet, error) // Endpoints ListEndpoints(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.AddressableV3Object, error) ListEndpointsWithFullInfo(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.Endpoint, error) CreateEndpoint(ctx context.Context, serviceId masherytypes.ServiceIdentifier, endp masherytypes.Endpoint) (masherytypes.Endpoint, error) UpdateEndpoint(ctx context.Context, endp masherytypes.Endpoint) (masherytypes.Endpoint, error) GetEndpoint(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) (masherytypes.Endpoint, bool, error) DeleteEndpoint(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) error CountEndpointsOf(ctx context.Context, serviceId masherytypes.ServiceIdentifier) (int64, error) // Endpoint methods ListEndpointMethods(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) ([]masherytypes.AddressableV3Object, error) ListEndpointMethodsWithFullInfo(ctx context.Context, dent masherytypes.ServiceEndpointIdentifier) ([]masherytypes.ServiceEndpointMethod, error) CreateEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, methodUpsert masherytypes.ServiceEndpointMethod) (masherytypes.ServiceEndpointMethod, error) UpdateEndpointMethod(ctx context.Context, methUpsert masherytypes.ServiceEndpointMethod) (masherytypes.ServiceEndpointMethod, error) GetEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) (masherytypes.ServiceEndpointMethod, bool, error) DeleteEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) error CountEndpointsMethodsOf(ctx context.Context, identifier masherytypes.ServiceEndpointIdentifier) (int64, error) // Endpoint method filters ListEndpointMethodFilters(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) ([]masherytypes.AddressableV3Object, error) ListEndpointMethodFiltersWithFullInfo(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) ([]masherytypes.ServiceEndpointMethodFilter, error) CreateEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, filterUpsert masherytypes.ServiceEndpointMethodFilter) (masherytypes.ServiceEndpointMethodFilter, error) UpdateEndpointMethodFilter(ctx context.Context, methUpsert masherytypes.ServiceEndpointMethodFilter) (masherytypes.ServiceEndpointMethodFilter, error) GetEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier) (masherytypes.ServiceEndpointMethodFilter, bool, error) DeleteEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier) error CountEndpointsMethodsFiltersOf(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) (int64, error) // Member GetMember(ctx context.Context, id masherytypes.MemberIdentifier) (masherytypes.Member, bool, error) GetFullMember(ctx context.Context, id masherytypes.MemberIdentifier) (masherytypes.Member, bool, error) CreateMember(ctx context.Context, member masherytypes.Member) (masherytypes.Member, error) UpdateMember(ctx context.Context, member masherytypes.Member) (masherytypes.Member, error) DeleteMember(ctx context.Context, memberId masherytypes.MemberIdentifier) error ListMembers(ctx context.Context) ([]masherytypes.Member, error) ListMembersFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Member, error) // Packages GetPackage(ctx context.Context, id masherytypes.PackageIdentifier) (masherytypes.Package, bool, error) CreatePackage(ctx context.Context, pack masherytypes.Package) (masherytypes.Package, error) UpdatePackage(ctx context.Context, pack masherytypes.Package) (masherytypes.Package, error) ResetPackageOwnership(ctx context.Context, pack masherytypes.PackageIdentifier) (masherytypes.Package, error) DeletePackage(ctx context.Context, packId masherytypes.PackageIdentifier) error ListPackages(ctx context.Context) ([]masherytypes.Package, error) ListPackagesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Package, error) // Package plans CreatePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (masherytypes.AddressableV3Object, error) CheckPlanServiceExists(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (bool, error) DeletePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) error CreatePlanEndpoint(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier) (masherytypes.AddressableV3Object, error) CheckPlanEndpointExists(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier) (bool, error) DeletePlanEndpoint(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier) error ListPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) ([]masherytypes.AddressableV3Object, error) CountPlanService(ctx context.Context, ident masherytypes.PackagePlanIdentifier) (int64, error) GetPlan(ctx context.Context, ident masherytypes.PackagePlanIdentifier) (masherytypes.Plan, bool, error) CreatePlan(ctx context.Context, packageId masherytypes.PackageIdentifier, plan masherytypes.Plan) (masherytypes.Plan, error) UpdatePlan(ctx context.Context, plan masherytypes.Plan) (masherytypes.Plan, error) DeletePlan(ctx context.Context, ident masherytypes.PackagePlanIdentifier) error CountPlans(ctx context.Context, packageId masherytypes.PackageIdentifier) (int64, error) ListPlans(ctx context.Context, packageId masherytypes.PackageIdentifier) ([]masherytypes.Plan, error) ListPlansFiltered(ctx context.Context, packageId masherytypes.PackageIdentifier, params map[string]string) ([]masherytypes.Plan, error) ListPlanServices(ctx context.Context, ident masherytypes.PackagePlanIdentifier) ([]masherytypes.Service, error) CountPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (int64, error) // Plan methods ListPackagePlanMethods(ctx context.Context, id masherytypes.PackagePlanServiceEndpointIdentifier) ([]masherytypes.PackagePlanServiceEndpointMethod, error) GetPackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) (masherytypes.PackagePlanServiceEndpointMethod, bool, error) CreatePackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) (masherytypes.PackagePlanServiceEndpointMethod, error) DeletePackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) error // PLan method filter GetPackagePlanMethodFilter(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) (masherytypes.PackagePlanServiceEndpointMethodFilter, bool, error) CreatePackagePlanMethodFilter(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodFilterIdentifier) (masherytypes.PackagePlanServiceEndpointMethodFilter, error) DeletePackagePlanMethodFilter(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) error // GetPackageKey Retrieves the application package key GetApplicationPackageKey(ctx context.Context, id masherytypes.ApplicationPackageKeyIdentifier) (masherytypes.ApplicationPackageKey, bool, error) CreateApplicationPackageKey(ctx context.Context, appId masherytypes.ApplicationIdentifier, packageKey masherytypes.ApplicationPackageKey) (masherytypes.ApplicationPackageKey, error) UpdateApplicationPackageKey(ctx context.Context, packageKey masherytypes.ApplicationPackageKey) (masherytypes.ApplicationPackageKey, error) DeleteApplicationPackageKey(ctx context.Context, keyId masherytypes.ApplicationPackageKeyIdentifier) error GetPackageKey(ctx context.Context, id masherytypes.PackageKeyIdentifier) (masherytypes.PackageKey, bool, error) CreatePackageKey(ctx context.Context, packageKey masherytypes.PackageKey) (masherytypes.PackageKey, error) UpdatePackageKey(ctx context.Context, packageKey masherytypes.PackageKey) (masherytypes.PackageKey, error) DeletePackageKey(ctx context.Context, keyId masherytypes.PackageKeyIdentifier) error ListPackageKeysFiltered(ctx context.Context, params map[string]string) ([]masherytypes.PackageKey, error) ListPackageKeys(ctx context.Context) ([]masherytypes.PackageKey, error) // Roles GetRole(ctx context.Context, id string) (masherytypes.Role, bool, error) ListRoles(ctx context.Context) ([]masherytypes.Role, error) ListRolesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Role, error) // GetService retrieves service based on the service identifier GetService(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.Service, bool, error) CreateService(ctx context.Context, service masherytypes.Service) (masherytypes.Service, error) UpdateService(ctx context.Context, service masherytypes.Service) (masherytypes.Service, error) DeleteService(ctx context.Context, serviceId masherytypes.ServiceIdentifier) error ListServicesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Service, error) ListServices(ctx context.Context) ([]masherytypes.Service, error) CountServices(ctx context.Context, params map[string]string) (int64, error) ListErrorSets(ctx context.Context, serviceId masherytypes.ServiceIdentifier, qs map[string]string) ([]masherytypes.ErrorSet, error) GetErrorSet(ctx context.Context, ident masherytypes.ErrorSetIdentifier) (masherytypes.ErrorSet, bool, error) CreateErrorSet(ctx context.Context, serviceId masherytypes.ServiceIdentifier, set masherytypes.ErrorSet) (masherytypes.ErrorSet, error) UpdateErrorSet(ctx context.Context, setData masherytypes.ErrorSet) (masherytypes.ErrorSet, error) DeleteErrorSet(ctx context.Context, ident masherytypes.ErrorSetIdentifier) error UpdateErrorSetMessage(ctx context.Context, msg masherytypes.MasheryErrorMessage) (masherytypes.MasheryErrorMessage, error) GetServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.RolePermission, bool, error) SetServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier, roles []masherytypes.RolePermission) error DeleteServiceRoles(ctx context.Context, id masherytypes.ServiceIdentifier) error // Service cache GetServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.ServiceCache, bool, error) CreateServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier, service masherytypes.ServiceCache) (masherytypes.ServiceCache, error) UpdateServiceCache(ctx context.Context, service masherytypes.ServiceCache) (masherytypes.ServiceCache, error) DeleteServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier) error // GetServiceOAuthSecurityProfile Service OAuth GetServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.MasheryOAuth, bool, error) CreateServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier, service masherytypes.MasheryOAuth) (masherytypes.MasheryOAuth, error) UpdateServiceOAuthSecurityProfile(ctx context.Context, service masherytypes.MasheryOAuth) (masherytypes.MasheryOAuth, error) DeleteServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier) error // ListOrganizations list all organizations defined ListOrganizations(ctx context.Context) ([]masherytypes.Organization, error) // ListOrganizationsFiltered list organizations matching the query string. ListOrganizationsFiltered(ctx context.Context, qs map[string]string) ([]masherytypes.Organization, error) }
func NewCustomClient ¶
func NewCustomClient(schema *ClientMethodSchema) Client
func NewHttpClient ¶
type ClientCredentialsProvider ¶
type ClientCredentialsProvider struct { V3OAuthHelper Response *masherytypes.TimedAccessTokenResponse // contains filtered or unexported fields }
func NewClientCredentialsProvider ¶
func NewClientCredentialsProvider(credentials MasheryV3Credentials, tlsCfg *tls.Config) *ClientCredentialsProvider
func NewLiveCredentialsProviderUsing ¶
func NewLiveCredentialsProviderUsing(credentials MasheryV3Credentials, endpoint string, tlsCfg *tls.Config) *ClientCredentialsProvider
func (*ClientCredentialsProvider) AccessToken ¶
func (lcp *ClientCredentialsProvider) AccessToken(_ context.Context) (string, error)
func (*ClientCredentialsProvider) Close ¶
func (lcp *ClientCredentialsProvider) Close()
func (*ClientCredentialsProvider) EnsureRefresh ¶
func (lcp *ClientCredentialsProvider) EnsureRefresh()
func (*ClientCredentialsProvider) HeaderAuthorization ¶
func (*ClientCredentialsProvider) OnPostRefresh ¶
func (lcp *ClientCredentialsProvider) OnPostRefresh(f func())
func (*ClientCredentialsProvider) QueryStringAuthorization ¶
func (*ClientCredentialsProvider) Refresh ¶
func (lcp *ClientCredentialsProvider) Refresh() error
func (*ClientCredentialsProvider) TokenData ¶
func (lcp *ClientCredentialsProvider) TokenData() (*masherytypes.TimedAccessTokenResponse, error)
type ClientMethodSchema ¶
type ClientMethodSchema struct { // Public and System Domains GetPublicDomains func(ctx context.Context, transport *transport.HttpTransport) ([]masherytypes.DomainAddress, error) GetSystemDomains func(ctx context.Context, transport *transport.HttpTransport) ([]masherytypes.DomainAddress, error) // Applications GetApplicationContext func(ctx context.Context, appId masherytypes.ApplicationIdentifier, transport *transport.HttpTransport) (masherytypes.Application, bool, error) GetApplicationExtendedAttributes func(ctx context.Context, appId masherytypes.ApplicationIdentifier, transport *transport.HttpTransport) (map[string]string, error) UpdateApplicationExtendedAttributes func(ctx context.Context, appId masherytypes.ApplicationIdentifier, params map[string]string, transport *transport.HttpTransport) (map[string]string, error) GetApplicationPackageKeys func(ctx context.Context, appId masherytypes.ApplicationIdentifier, transport *transport.HttpTransport) ([]masherytypes.ApplicationPackageKey, error) CountApplicationPackageKeys func(ctx context.Context, appId masherytypes.ApplicationIdentifier, c *transport.HttpTransport) (int64, error) GetFullApplication func(ctx context.Context, id masherytypes.ApplicationIdentifier, c *transport.HttpTransport) (masherytypes.Application, bool, error) CreateApplication func(ctx context.Context, memberId masherytypes.MemberIdentifier, app masherytypes.Application, c *transport.HttpTransport) (masherytypes.Application, error) UpdateApplication func(ctx context.Context, app masherytypes.Application, c *transport.HttpTransport) (masherytypes.Application, error) DeleteApplication func(ctx context.Context, appId masherytypes.ApplicationIdentifier, c *transport.HttpTransport) error CountApplicationsOfMember func(ctx context.Context, memberId masherytypes.MemberIdentifier, c *transport.HttpTransport) (int64, error) ListApplications func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.Application, error) ListApplicationsFiltered func(ctx context.Context, params map[string]string, c *transport.HttpTransport) ([]masherytypes.Application, error) // Email template set GetEmailTemplateSet func(ctx context.Context, id string, c *transport.HttpTransport) (masherytypes.EmailTemplateSet, bool, error) ListEmailTemplateSets func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.EmailTemplateSet, error) ListEmailTemplateSetsFiltered func(ctx context.Context, params map[string]string, c *transport.HttpTransport) ([]masherytypes.EmailTemplateSet, error) // Endpoints ListEndpoints func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error) ListEndpointsWithFullInfo func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, c *transport.HttpTransport) ([]masherytypes.Endpoint, error) CreateEndpoint func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, endp masherytypes.Endpoint, c *transport.HttpTransport) (masherytypes.Endpoint, error) UpdateEndpoint func(ctx context.Context, endpoint masherytypes.Endpoint, c *transport.HttpTransport) (masherytypes.Endpoint, error) GetEndpoint func(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, c *transport.HttpTransport) (masherytypes.Endpoint, bool, error) DeleteEndpoint func(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, c *transport.HttpTransport) error CountEndpointsOf func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, c *transport.HttpTransport) (int64, error) // Endpoint Methods ListEndpointMethods func(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error) ListEndpointMethodsWithFullInfo func(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, c *transport.HttpTransport) ([]masherytypes.ServiceEndpointMethod, error) CreateEndpointMethod func(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, methoUpsert masherytypes.ServiceEndpointMethod, c *transport.HttpTransport) (masherytypes.ServiceEndpointMethod, error) UpdateEndpointMethod func(ctx context.Context, methUpsert masherytypes.ServiceEndpointMethod, c *transport.HttpTransport) (masherytypes.ServiceEndpointMethod, error) GetEndpointMethod func(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, c *transport.HttpTransport) (masherytypes.ServiceEndpointMethod, bool, error) DeleteEndpointMethod func(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, c *transport.HttpTransport) error CountEndpointsMethodsOf func(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, c *transport.HttpTransport) (int64, error) // Endpoint method filters ListEndpointMethodFilters func(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error) ListEndpointMethodFiltersWithFullInfo func(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, c *transport.HttpTransport) ([]masherytypes.ServiceEndpointMethodFilter, error) CreateEndpointMethodFilter func(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, filterUpsert masherytypes.ServiceEndpointMethodFilter, c *transport.HttpTransport) (masherytypes.ServiceEndpointMethodFilter, error) UpdateEndpointMethodFilter func(ctx context.Context, methUpsert masherytypes.ServiceEndpointMethodFilter, c *transport.HttpTransport) (masherytypes.ServiceEndpointMethodFilter, error) GetEndpointMethodFilter func(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier, c *transport.HttpTransport) (masherytypes.ServiceEndpointMethodFilter, bool, error) DeleteEndpointMethodFilter func(ctx context.Context, dent masherytypes.ServiceEndpointMethodFilterIdentifier, c *transport.HttpTransport) error CountEndpointsMethodsFiltersOf func(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, c *transport.HttpTransport) (int64, error) // Member GetMember func(ctx context.Context, id masherytypes.MemberIdentifier, c *transport.HttpTransport) (masherytypes.Member, bool, error) GetFullMember func(ctx context.Context, id masherytypes.MemberIdentifier, c *transport.HttpTransport) (masherytypes.Member, bool, error) CreateMember func(ctx context.Context, member masherytypes.Member, c *transport.HttpTransport) (masherytypes.Member, error) UpdateMember func(ctx context.Context, member masherytypes.Member, c *transport.HttpTransport) (masherytypes.Member, error) DeleteMember func(ctx context.Context, memberId masherytypes.MemberIdentifier, c *transport.HttpTransport) error ListMembers func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.Member, error) ListMembersFiltered func(ctx context.Context, m map[string]string, c *transport.HttpTransport) ([]masherytypes.Member, error) // Packages GetPackage func(ctx context.Context, id masherytypes.PackageIdentifier, c *transport.HttpTransport) (masherytypes.Package, bool, error) CreatePackage func(ctx context.Context, pack masherytypes.Package, c *transport.HttpTransport) (masherytypes.Package, error) UpdatePackage func(ctx context.Context, pack masherytypes.Package, c *transport.HttpTransport) (masherytypes.Package, error) ResetPackageOwnership func(ctx context.Context, pack masherytypes.PackageIdentifier, c *transport.HttpTransport) (masherytypes.Package, error) DeletePackage func(ctx context.Context, packId masherytypes.PackageIdentifier, c *transport.HttpTransport) error ListPackages func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.Package, error) ListPackagesFiltered func(ctx context.Context, params map[string]string, c *transport.HttpTransport) ([]masherytypes.Package, error) // Package plans CreatePlanService func(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) (masherytypes.AddressableV3Object, error) CheckPlanServiceExists func(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) (bool, error) DeletePlanService func(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) error CreatePlanEndpoint func(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) (masherytypes.AddressableV3Object, error) CheckPlanEndpointExists func(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) (bool, error) DeletePlanEndpoint func(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) error ListPlanEndpoints func(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error) CountPlanEndpoints func(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier, c *transport.HttpTransport) (int64, error) CountPlanService func(ctx context.Context, ident masherytypes.PackagePlanIdentifier, c *transport.HttpTransport) (int64, error) GetPlan func(ctx context.Context, ident masherytypes.PackagePlanIdentifier, c *transport.HttpTransport) (masherytypes.Plan, bool, error) CreatePlan func(ctx context.Context, packageId masherytypes.PackageIdentifier, plan masherytypes.Plan, c *transport.HttpTransport) (masherytypes.Plan, error) UpdatePlan func(ctx context.Context, plan masherytypes.Plan, c *transport.HttpTransport) (masherytypes.Plan, error) DeletePlan func(ctx context.Context, dent masherytypes.PackagePlanIdentifier, c *transport.HttpTransport) error CountPlans func(ctx context.Context, packageId masherytypes.PackageIdentifier, c *transport.HttpTransport) (int64, error) ListPlans func(ctx context.Context, packageId masherytypes.PackageIdentifier, c *transport.HttpTransport) ([]masherytypes.Plan, error) ListPlansFiltered func(ctx context.Context, packageId masherytypes.PackageIdentifier, params map[string]string, c *transport.HttpTransport) ([]masherytypes.Plan, error) ListPlanServices func(ctx context.Context, dent masherytypes.PackagePlanIdentifier, c *transport.HttpTransport) ([]masherytypes.Service, error) // Plan methods ListPackagePlanMethods func(ctx context.Context, id masherytypes.PackagePlanServiceEndpointIdentifier, c *transport.HttpTransport) ([]masherytypes.PackagePlanServiceEndpointMethod, error) GetPackagePlanMethod func(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethod, bool, error) CreatePackagePlanMethod func(ctx context.Context, ident masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethod, error) DeletePackagePlanMethod func(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) error // Plan method filter GetPackagePlanMethodFilter func(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethodFilter, bool, error) CreatePackagePlanMethodFilter func(ctx context.Context, ident masherytypes.PackagePlanServiceEndpointMethodFilterIdentifier, c *transport.HttpTransport) (masherytypes.PackagePlanServiceEndpointMethodFilter, error) DeletePackagePlanMethodFilter func(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier, c *transport.HttpTransport) error // Package key GetApplicationPackageKey func(ctx context.Context, id masherytypes.ApplicationPackageKeyIdentifier, c *transport.HttpTransport) (masherytypes.ApplicationPackageKey, bool, error) CreateApplicationPackageKey func(ctx context.Context, appId masherytypes.ApplicationIdentifier, packageKey masherytypes.ApplicationPackageKey, c *transport.HttpTransport) (masherytypes.ApplicationPackageKey, error) UpdateApplicationPackageKey func(ctx context.Context, packageKey masherytypes.ApplicationPackageKey, c *transport.HttpTransport) (masherytypes.ApplicationPackageKey, error) DeleteApplicationPackageKey func(ctx context.Context, keyId masherytypes.ApplicationPackageKeyIdentifier, c *transport.HttpTransport) error GetPackageKey func(ctx context.Context, id masherytypes.PackageKeyIdentifier, c *transport.HttpTransport) (masherytypes.PackageKey, bool, error) CreatePackageKey func(ctx context.Context, packageKey masherytypes.PackageKey, c *transport.HttpTransport) (masherytypes.PackageKey, error) UpdatePackageKey func(ctx context.Context, packageKey masherytypes.PackageKey, c *transport.HttpTransport) (masherytypes.PackageKey, error) DeletePackageKey func(ctx context.Context, keyId masherytypes.PackageKeyIdentifier, c *transport.HttpTransport) error ListPackageKeysFiltered func(ctx context.Context, params map[string]string, c *transport.HttpTransport) ([]masherytypes.PackageKey, error) ListPackageKeys func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.PackageKey, error) // Roles GetRole func(ctx context.Context, id string, c *transport.HttpTransport) (masherytypes.Role, bool, error) ListRoles func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.Role, error) ListRolesFiltered func(ctx context.Context, params map[string]string, c *transport.HttpTransport) ([]masherytypes.Role, error) // Services GetService func(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) (masherytypes.Service, bool, error) CreateService func(ctx context.Context, service masherytypes.Service, c *transport.HttpTransport) (masherytypes.Service, error) UpdateService func(ctx context.Context, service masherytypes.Service, c *transport.HttpTransport) (masherytypes.Service, error) DeleteService func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, c *transport.HttpTransport) error ListServicesFiltered func(ctx context.Context, params map[string]string, c *transport.HttpTransport) ([]masherytypes.Service, error) ListServices func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.Service, error) CountServices func(ctx context.Context, params map[string]string, c *transport.HttpTransport) (int64, error) ListErrorSets func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, qs map[string]string, c *transport.HttpTransport) ([]masherytypes.ErrorSet, error) GetErrorSet func(ctx context.Context, ident masherytypes.ErrorSetIdentifier, c *transport.HttpTransport) (masherytypes.ErrorSet, bool, error) CreateErrorSet func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, set masherytypes.ErrorSet, c *transport.HttpTransport) (masherytypes.ErrorSet, error) UpdateErrorSet func(ctx context.Context, setData masherytypes.ErrorSet, c *transport.HttpTransport) (masherytypes.ErrorSet, error) DeleteErrorSet func(ctx context.Context, ident masherytypes.ErrorSetIdentifier, c *transport.HttpTransport) error UpdateErrorSetMessage func(ctx context.Context, msg masherytypes.MasheryErrorMessage, c *transport.HttpTransport) (masherytypes.MasheryErrorMessage, error) GetServiceRoles func(ctx context.Context, serviceId masherytypes.ServiceIdentifier, c *transport.HttpTransport) ([]masherytypes.RolePermission, bool, error) SetServiceRoles func(ctx context.Context, id masherytypes.ServiceIdentifier, roles []masherytypes.RolePermission, c *transport.HttpTransport) error DeleteServiceRoles func(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) error // Service cache GetServiceCache func(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) (masherytypes.ServiceCache, bool, error) CreateServiceCache func(ctx context.Context, id masherytypes.ServiceIdentifier, service masherytypes.ServiceCache, c *transport.HttpTransport) (masherytypes.ServiceCache, error) UpdateServiceCache func(ctx context.Context, service masherytypes.ServiceCache, c *transport.HttpTransport) (masherytypes.ServiceCache, error) DeleteServiceCache func(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) error // Service OAuth GetServiceOAuthSecurityProfile func(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) (masherytypes.MasheryOAuth, bool, error) CreateServiceOAuthSecurityProfile func(ctx context.Context, id masherytypes.ServiceIdentifier, service masherytypes.MasheryOAuth, c *transport.HttpTransport) (masherytypes.MasheryOAuth, error) UpdateServiceOAuthSecurityProfile func(ctx context.Context, service masherytypes.MasheryOAuth, c *transport.HttpTransport) (masherytypes.MasheryOAuth, error) DeleteServiceOAuthSecurityProfile func(ctx context.Context, id masherytypes.ServiceIdentifier, c *transport.HttpTransport) error ListOrganizations func(ctx context.Context, c *transport.HttpTransport) ([]masherytypes.Organization, error) ListOrganizationsFiltered func(ctx context.Context, qs map[string]string, c *transport.HttpTransport) ([]masherytypes.Organization, error) }
func AutoRetryOnBadRequestMethodSchema ¶
func AutoRetryOnBadRequestMethodSchema() *ClientMethodSchema
func StandardClientMethodSchema ¶
func StandardClientMethodSchema() *ClientMethodSchema
type ContextTokenProvider ¶
type ContextTokenProvider struct {
// contains filtered or unexported fields
}
func (*ContextTokenProvider) AccessToken ¶
func (f *ContextTokenProvider) AccessToken(ctx context.Context) (string, error)
func (*ContextTokenProvider) Close ¶
func (f *ContextTokenProvider) Close()
func (*ContextTokenProvider) HeaderAuthorization ¶
func (*ContextTokenProvider) QueryStringAuthorization ¶
type ExchangeBoolFunc ¶
type ExchangeFunc ¶
type FileSystemTokenProvider ¶
type FileSystemTokenProvider struct { FixedTokenProvider Response *masherytypes.TimedAccessTokenResponse // contains filtered or unexported fields }
FileSystemTokenProvider An access token provider that serve access token that has been pre-saved and persisted. The file will be periodically checked for the modification. The provider will retain the most recent successfully read response.
func (*FileSystemTokenProvider) AccessToken ¶
func (f *FileSystemTokenProvider) AccessToken(ctx context.Context) (string, error)
func (*FileSystemTokenProvider) Close ¶
func (f *FileSystemTokenProvider) Close()
func (*FileSystemTokenProvider) HeaderAuthorization ¶
type FixedSchemeClient ¶
type FixedSchemeClient struct {
PluggableClient
}
FixedSchemeClient Fixed method scheme client that will not allow changing schema after it was created.
func (*FixedSchemeClient) AssumeSchema ¶
func (fsc *FixedSchemeClient) AssumeSchema(_ *ClientMethodSchema)
type FixedTokenProvider ¶
type FixedTokenProvider struct {
// contains filtered or unexported fields
}
FixedTokenProvider Implementation of a fixed access token provider
func (*FixedTokenProvider) AccessToken ¶
func (f *FixedTokenProvider) AccessToken(_ context.Context) (string, error)
func (*FixedTokenProvider) Close ¶
func (f *FixedTokenProvider) Close()
func (*FixedTokenProvider) HeaderAuthorization ¶
func (*FixedTokenProvider) QueryStringAuthorization ¶
func (*FixedTokenProvider) UpdateToken ¶
func (f *FixedTokenProvider) UpdateToken(tkn string)
type GenericCRUD ¶
type GenericCRUD[TParent, TIdent, T any] struct { AppContext string Decorator GenericCRUDDecorator[TParent, TIdent, T] // contains filtered or unexported fields }
func NewCRUD ¶
func NewCRUD[TParent, TIdent, T any](appContext string, d *GenericCRUDDecorator[TParent, TIdent, T]) *GenericCRUD[TParent, TIdent, T]
func (*GenericCRUD[TParent, TIdent, T]) Count ¶
func (crud *GenericCRUD[TParent, TIdent, T]) Count(ctx context.Context, id TParent, c *transport.HttpTransport) (int64, error)
func (*GenericCRUD[TParent, TIdent, T]) CountFiltered ¶
func (crud *GenericCRUD[TParent, TIdent, T]) CountFiltered(ctx context.Context, id TParent, filter map[string]string, c *transport.HttpTransport) (int64, error)
func (*GenericCRUD[TParent, TIdent, T]) Create ¶
func (crud *GenericCRUD[TParent, TIdent, T]) Create(ctx context.Context, ident TParent, upsert T, c *transport.HttpTransport) (T, error)
func (*GenericCRUD[TParent, TIdent, T]) Delete ¶
func (crud *GenericCRUD[TParent, TIdent, T]) Delete(ctx context.Context, id TIdent, c *transport.HttpTransport) error
func (*GenericCRUD[TParent, TIdent, T]) Exists ¶
func (crud *GenericCRUD[TParent, TIdent, T]) Exists(ctx context.Context, ident TIdent, c *transport.HttpTransport) (bool, error)
func (*GenericCRUD[TParent, TIdent, T]) FetchAll ¶
func (crud *GenericCRUD[TParent, TIdent, T]) FetchAll(ctx context.Context, id TParent, c *transport.HttpTransport) ([]T, error)
func (*GenericCRUD[TParent, TIdent, T]) FetchAllAsAddressable ¶
func (crud *GenericCRUD[TParent, TIdent, T]) FetchAllAsAddressable(ctx context.Context, id TParent, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error)
func (*GenericCRUD[TParent, TIdent, T]) FetchAllAsAddressableFiltered ¶
func (crud *GenericCRUD[TParent, TIdent, T]) FetchAllAsAddressableFiltered(ctx context.Context, id TParent, filter map[string]string, c *transport.HttpTransport) ([]masherytypes.AddressableV3Object, error)
func (*GenericCRUD[TParent, TIdent, T]) FetchFiltered ¶
func (crud *GenericCRUD[TParent, TIdent, T]) FetchFiltered(ctx context.Context, id TParent, filter map[string]string, c *transport.HttpTransport) ([]T, error)
func (*GenericCRUD[TParent, TIdent, T]) Get ¶
func (crud *GenericCRUD[TParent, TIdent, T]) Get(ctx context.Context, ident TIdent, c *transport.HttpTransport) (T, bool, error)
func (*GenericCRUD[TParent, TIdent, T]) StubValue ¶
func (crud *GenericCRUD[TParent, TIdent, T]) StubValue() T
func (*GenericCRUD[TParent, TIdent, T]) Update ¶
func (crud *GenericCRUD[TParent, TIdent, T]) Update(ctx context.Context, upsert T, c *transport.HttpTransport) (T, error)
type GenericCRUDDecorator ¶
type GenericCRUDDecorator[ParentIdent, TIdent, T any] struct { ValueSupplier transport.Supplier[T] ValueArraySupplier transport.Supplier[[]T] ResourceFor func(TIdent) (string, error) // ResourceForUpsert Return a resource for upsert operation. ResourceForUpsert func(T) (string, error) ResourceForParent func(ParentIdent) (string, error) UpsertCleaner func(*T) DefaultFields []string GetFields func(context.Context) []string Pagination transport.PaginationType AcceptObjectIdent BiConsumer[TIdent, *T] AcceptParentIdent BiConsumer[ParentIdent, *T] AcceptIdentFrom BiConsumer[T, *T] }
type MasheryV3Credentials ¶
type MasheryV3Credentials struct { AreaId string `yaml:"areaId,omitempty"` ApiKey string `yaml:"apiKey,omitempty"` Secret string `yaml:"secret,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` MaxQPS int `yaml:"maxQPS,omitempty"` }
func DeriveAccessCredentials ¶
func DeriveAccessCredentials(customFile, filePass string, fallbackCreds *MasheryV3Credentials) MasheryV3Credentials
DeriveAccessCredentials derives credentials from all applicable sources, including the command line The sequence of derivation is: - Environment variables, overridden by - User settings file, overridden by - Credentials file in the working directory, overriden by - Command line arguments
func (*MasheryV3Credentials) FullySpecified ¶
func (m *MasheryV3Credentials) FullySpecified() bool
func (*MasheryV3Credentials) Inherit ¶
func (m *MasheryV3Credentials) Inherit(other *MasheryV3Credentials)
type OAuthHelperParams ¶
type OAuthHelperParams struct { transport.HTTPClientParams MasheryTokenEndpoint string }
func (*OAuthHelperParams) FillDefaults ¶
func (ohp *OAuthHelperParams) FillDefaults()
type OrganizationCRUDDecorator ¶
type OrganizationCRUDDecorator struct { }
func (OrganizationCRUDDecorator) ValueArraySupplier ¶
func (o OrganizationCRUDDecorator) ValueArraySupplier() transport.Supplier[[]masherytypes.Organization]
func (OrganizationCRUDDecorator) ValueSupplier ¶
func (o OrganizationCRUDDecorator) ValueSupplier() transport.Supplier[masherytypes.Organization]
type Params ¶
type Params struct { transport.HTTPClientParams MashEndpoint string Authorizer transport.Authorizer QPS int64 AvgNetLatency time.Duration Pipeline []transport.ChainedMiddlewareFunc }
func (*Params) FillDefaults ¶
func (p *Params) FillDefaults()
type PluggableClient ¶
type PluggableClient struct {
// contains filtered or unexported fields
}
func (*PluggableClient) AssumeSchema ¶
func (c *PluggableClient) AssumeSchema(sch *ClientMethodSchema)
AssumeSchema Allows a pluggable client to assume a schema. This method should be mainly used in the test contexts.
func (*PluggableClient) CheckPlanEndpointExists ¶
func (c *PluggableClient) CheckPlanEndpointExists(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier) (bool, error)
func (*PluggableClient) CheckPlanServiceExists ¶
func (c *PluggableClient) CheckPlanServiceExists(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (bool, error)
func (*PluggableClient) CountApplicationPackageKeys ¶
func (c *PluggableClient) CountApplicationPackageKeys(ctx context.Context, appId masherytypes.ApplicationIdentifier) (int64, error)
func (*PluggableClient) CountApplicationsOfMember ¶
func (c *PluggableClient) CountApplicationsOfMember(ctx context.Context, memberId masherytypes.MemberIdentifier) (int64, error)
func (*PluggableClient) CountEndpointsMethodsFiltersOf ¶
func (c *PluggableClient) CountEndpointsMethodsFiltersOf(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) (int64, error)
func (*PluggableClient) CountEndpointsMethodsOf ¶
func (c *PluggableClient) CountEndpointsMethodsOf(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) (int64, error)
func (*PluggableClient) CountEndpointsOf ¶
func (c *PluggableClient) CountEndpointsOf(ctx context.Context, serviceId masherytypes.ServiceIdentifier) (int64, error)
func (*PluggableClient) CountPlanEndpoints ¶
func (c *PluggableClient) CountPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (int64, error)
func (*PluggableClient) CountPlanService ¶
func (c *PluggableClient) CountPlanService(ctx context.Context, ident masherytypes.PackagePlanIdentifier) (int64, error)
func (*PluggableClient) CountPlans ¶
func (c *PluggableClient) CountPlans(ctx context.Context, packageId masherytypes.PackageIdentifier) (int64, error)
func (*PluggableClient) CountServices ¶
func (*PluggableClient) CreateApplication ¶
func (c *PluggableClient) CreateApplication(ctx context.Context, memberId masherytypes.MemberIdentifier, app masherytypes.Application) (masherytypes.Application, error)
func (*PluggableClient) CreateApplicationPackageKey ¶
func (c *PluggableClient) CreateApplicationPackageKey(ctx context.Context, appId masherytypes.ApplicationIdentifier, packageKey masherytypes.ApplicationPackageKey) (masherytypes.ApplicationPackageKey, error)
func (*PluggableClient) CreateEndpoint ¶
func (c *PluggableClient) CreateEndpoint(ctx context.Context, serviceId masherytypes.ServiceIdentifier, endp masherytypes.Endpoint) (masherytypes.Endpoint, error)
func (*PluggableClient) CreateEndpointMethod ¶
func (c *PluggableClient) CreateEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier, methoUpsert masherytypes.ServiceEndpointMethod) (masherytypes.ServiceEndpointMethod, error)
func (*PluggableClient) CreateEndpointMethodFilter ¶
func (c *PluggableClient) CreateEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier, filterUpsert masherytypes.ServiceEndpointMethodFilter) (masherytypes.ServiceEndpointMethodFilter, error)
func (*PluggableClient) CreateErrorSet ¶
func (c *PluggableClient) CreateErrorSet(ctx context.Context, serviceId masherytypes.ServiceIdentifier, set masherytypes.ErrorSet) (masherytypes.ErrorSet, error)
func (*PluggableClient) CreateMember ¶
func (c *PluggableClient) CreateMember(ctx context.Context, member masherytypes.Member) (masherytypes.Member, error)
func (*PluggableClient) CreatePackage ¶
func (c *PluggableClient) CreatePackage(ctx context.Context, pack masherytypes.Package) (masherytypes.Package, error)
func (*PluggableClient) CreatePackageKey ¶
func (c *PluggableClient) CreatePackageKey(ctx context.Context, packageKey masherytypes.PackageKey) (masherytypes.PackageKey, error)
func (*PluggableClient) CreatePackagePlanMethod ¶
func (c *PluggableClient) CreatePackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) (masherytypes.PackagePlanServiceEndpointMethod, error)
func (*PluggableClient) CreatePackagePlanMethodFilter ¶
func (c *PluggableClient) CreatePackagePlanMethodFilter(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodFilterIdentifier) (masherytypes.PackagePlanServiceEndpointMethodFilter, error)
func (*PluggableClient) CreatePlan ¶
func (c *PluggableClient) CreatePlan(ctx context.Context, packageId masherytypes.PackageIdentifier, plan masherytypes.Plan) (masherytypes.Plan, error)
func (*PluggableClient) CreatePlanEndpoint ¶
func (c *PluggableClient) CreatePlanEndpoint(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier) (masherytypes.AddressableV3Object, error)
func (*PluggableClient) CreatePlanService ¶
func (c *PluggableClient) CreatePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) (masherytypes.AddressableV3Object, error)
func (*PluggableClient) CreateService ¶
func (c *PluggableClient) CreateService(ctx context.Context, service masherytypes.Service) (masherytypes.Service, error)
func (*PluggableClient) CreateServiceCache ¶
func (c *PluggableClient) CreateServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier, service masherytypes.ServiceCache) (masherytypes.ServiceCache, error)
func (*PluggableClient) CreateServiceOAuthSecurityProfile ¶
func (c *PluggableClient) CreateServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier, oauth masherytypes.MasheryOAuth) (masherytypes.MasheryOAuth, error)
func (*PluggableClient) DeleteApplication ¶
func (c *PluggableClient) DeleteApplication(ctx context.Context, appId masherytypes.ApplicationIdentifier) error
func (*PluggableClient) DeleteApplicationPackageKey ¶
func (c *PluggableClient) DeleteApplicationPackageKey(ctx context.Context, keyId masherytypes.ApplicationPackageKeyIdentifier) error
func (*PluggableClient) DeleteEndpoint ¶
func (c *PluggableClient) DeleteEndpoint(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) error
func (*PluggableClient) DeleteEndpointMethod ¶
func (c *PluggableClient) DeleteEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) error
func (*PluggableClient) DeleteEndpointMethodFilter ¶
func (c *PluggableClient) DeleteEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier) error
func (*PluggableClient) DeleteErrorSet ¶
func (c *PluggableClient) DeleteErrorSet(ctx context.Context, ident masherytypes.ErrorSetIdentifier) error
func (*PluggableClient) DeleteMember ¶
func (c *PluggableClient) DeleteMember(ctx context.Context, memberId masherytypes.MemberIdentifier) error
func (*PluggableClient) DeletePackage ¶
func (c *PluggableClient) DeletePackage(ctx context.Context, packId masherytypes.PackageIdentifier) error
func (*PluggableClient) DeletePackageKey ¶
func (c *PluggableClient) DeletePackageKey(ctx context.Context, keyId masherytypes.PackageKeyIdentifier) error
func (*PluggableClient) DeletePackagePlanMethod ¶
func (c *PluggableClient) DeletePackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) error
func (*PluggableClient) DeletePackagePlanMethodFilter ¶
func (c *PluggableClient) DeletePackagePlanMethodFilter(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) error
func (*PluggableClient) DeletePlan ¶
func (c *PluggableClient) DeletePlan(ctx context.Context, ident masherytypes.PackagePlanIdentifier) error
func (*PluggableClient) DeletePlanEndpoint ¶
func (c *PluggableClient) DeletePlanEndpoint(ctx context.Context, planEndp masherytypes.PackagePlanServiceEndpointIdentifier) error
func (*PluggableClient) DeletePlanService ¶
func (c *PluggableClient) DeletePlanService(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) error
func (*PluggableClient) DeleteService ¶
func (c *PluggableClient) DeleteService(ctx context.Context, serviceId masherytypes.ServiceIdentifier) error
func (*PluggableClient) DeleteServiceCache ¶
func (c *PluggableClient) DeleteServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier) error
func (*PluggableClient) DeleteServiceOAuthSecurityProfile ¶
func (c *PluggableClient) DeleteServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier) error
func (*PluggableClient) DeleteServiceRoles ¶
func (c *PluggableClient) DeleteServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier) error
func (*PluggableClient) GetApplication ¶
func (c *PluggableClient) GetApplication(ctx context.Context, appId masherytypes.ApplicationIdentifier) (masherytypes.Application, bool, error)
func (*PluggableClient) GetApplicationExtendedAttributes ¶
func (c *PluggableClient) GetApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier) (map[string]string, error)
func (*PluggableClient) GetApplicationPackageKey ¶
func (c *PluggableClient) GetApplicationPackageKey(ctx context.Context, id masherytypes.ApplicationPackageKeyIdentifier) (masherytypes.ApplicationPackageKey, bool, error)
func (*PluggableClient) GetApplicationPackageKeys ¶
func (c *PluggableClient) GetApplicationPackageKeys(ctx context.Context, appId masherytypes.ApplicationIdentifier) ([]masherytypes.ApplicationPackageKey, error)
func (*PluggableClient) GetEmailTemplateSet ¶
func (c *PluggableClient) GetEmailTemplateSet(ctx context.Context, id string) (masherytypes.EmailTemplateSet, bool, error)
func (*PluggableClient) GetEndpoint ¶
func (c *PluggableClient) GetEndpoint(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) (masherytypes.Endpoint, bool, error)
func (*PluggableClient) GetEndpointMethod ¶
func (c *PluggableClient) GetEndpointMethod(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) (masherytypes.ServiceEndpointMethod, bool, error)
func (*PluggableClient) GetEndpointMethodFilter ¶
func (c *PluggableClient) GetEndpointMethodFilter(ctx context.Context, ident masherytypes.ServiceEndpointMethodFilterIdentifier) (masherytypes.ServiceEndpointMethodFilter, bool, error)
func (*PluggableClient) GetErrorSet ¶
func (c *PluggableClient) GetErrorSet(ctx context.Context, ident masherytypes.ErrorSetIdentifier) (masherytypes.ErrorSet, bool, error)
func (*PluggableClient) GetFullApplication ¶
func (c *PluggableClient) GetFullApplication(ctx context.Context, id masherytypes.ApplicationIdentifier) (masherytypes.Application, bool, error)
func (*PluggableClient) GetFullMember ¶
func (c *PluggableClient) GetFullMember(ctx context.Context, id masherytypes.MemberIdentifier) (masherytypes.Member, bool, error)
func (*PluggableClient) GetMember ¶
func (c *PluggableClient) GetMember(ctx context.Context, id masherytypes.MemberIdentifier) (masherytypes.Member, bool, error)
func (*PluggableClient) GetPackage ¶
func (c *PluggableClient) GetPackage(ctx context.Context, id masherytypes.PackageIdentifier) (masherytypes.Package, bool, error)
func (*PluggableClient) GetPackageKey ¶
func (c *PluggableClient) GetPackageKey(ctx context.Context, id masherytypes.PackageKeyIdentifier) (masherytypes.PackageKey, bool, error)
func (*PluggableClient) GetPackagePlanMethod ¶
func (c *PluggableClient) GetPackagePlanMethod(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) (masherytypes.PackagePlanServiceEndpointMethod, bool, error)
func (*PluggableClient) GetPackagePlanMethodFilter ¶
func (c *PluggableClient) GetPackagePlanMethodFilter(ctx context.Context, id masherytypes.PackagePlanServiceEndpointMethodIdentifier) (masherytypes.PackagePlanServiceEndpointMethodFilter, bool, error)
func (*PluggableClient) GetPlan ¶
func (c *PluggableClient) GetPlan(ctx context.Context, ident masherytypes.PackagePlanIdentifier) (masherytypes.Plan, bool, error)
func (*PluggableClient) GetPublicDomains ¶
func (c *PluggableClient) GetPublicDomains(ctx context.Context) ([]masherytypes.DomainAddress, error)
func (*PluggableClient) GetRole ¶
func (c *PluggableClient) GetRole(ctx context.Context, id string) (masherytypes.Role, bool, error)
func (*PluggableClient) GetService ¶
func (c *PluggableClient) GetService(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.Service, bool, error)
func (*PluggableClient) GetServiceCache ¶
func (c *PluggableClient) GetServiceCache(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.ServiceCache, bool, error)
func (*PluggableClient) GetServiceOAuthSecurityProfile ¶
func (c *PluggableClient) GetServiceOAuthSecurityProfile(ctx context.Context, id masherytypes.ServiceIdentifier) (masherytypes.MasheryOAuth, bool, error)
Service OAtuh
func (*PluggableClient) GetServiceRoles ¶
func (c *PluggableClient) GetServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.RolePermission, bool, error)
func (*PluggableClient) GetSystemDomains ¶
func (c *PluggableClient) GetSystemDomains(ctx context.Context) ([]masherytypes.DomainAddress, error)
func (*PluggableClient) ListApplications ¶
func (c *PluggableClient) ListApplications(ctx context.Context) ([]masherytypes.Application, error)
func (*PluggableClient) ListApplicationsFiltered ¶
func (c *PluggableClient) ListApplicationsFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Application, error)
func (*PluggableClient) ListEmailTemplateSets ¶
func (c *PluggableClient) ListEmailTemplateSets(ctx context.Context) ([]masherytypes.EmailTemplateSet, error)
func (*PluggableClient) ListEmailTemplateSetsFiltered ¶
func (c *PluggableClient) ListEmailTemplateSetsFiltered(ctx context.Context, params map[string]string) ([]masherytypes.EmailTemplateSet, error)
func (*PluggableClient) ListEndpointMethodFilters ¶
func (c *PluggableClient) ListEndpointMethodFilters(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) ([]masherytypes.AddressableV3Object, error)
func (*PluggableClient) ListEndpointMethodFiltersWithFullInfo ¶
func (c *PluggableClient) ListEndpointMethodFiltersWithFullInfo(ctx context.Context, ident masherytypes.ServiceEndpointMethodIdentifier) ([]masherytypes.ServiceEndpointMethodFilter, error)
func (*PluggableClient) ListEndpointMethods ¶
func (c *PluggableClient) ListEndpointMethods(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) ([]masherytypes.AddressableV3Object, error)
func (*PluggableClient) ListEndpointMethodsWithFullInfo ¶
func (c *PluggableClient) ListEndpointMethodsWithFullInfo(ctx context.Context, ident masherytypes.ServiceEndpointIdentifier) ([]masherytypes.ServiceEndpointMethod, error)
func (*PluggableClient) ListEndpoints ¶
func (c *PluggableClient) ListEndpoints(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.AddressableV3Object, error)
func (*PluggableClient) ListEndpointsWithFullInfo ¶
func (c *PluggableClient) ListEndpointsWithFullInfo(ctx context.Context, serviceId masherytypes.ServiceIdentifier) ([]masherytypes.Endpoint, error)
func (*PluggableClient) ListErrorSets ¶
func (c *PluggableClient) ListErrorSets(ctx context.Context, serviceId masherytypes.ServiceIdentifier, qs map[string]string) ([]masherytypes.ErrorSet, error)
func (*PluggableClient) ListMembers ¶
func (c *PluggableClient) ListMembers(ctx context.Context) ([]masherytypes.Member, error)
func (*PluggableClient) ListMembersFiltered ¶
func (c *PluggableClient) ListMembersFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Member, error)
func (*PluggableClient) ListOrganizations ¶
func (c *PluggableClient) ListOrganizations(ctx context.Context) ([]masherytypes.Organization, error)
ListOrganizations list all organizations defined
func (*PluggableClient) ListOrganizationsFiltered ¶
func (c *PluggableClient) ListOrganizationsFiltered(ctx context.Context, qs map[string]string) ([]masherytypes.Organization, error)
ListOrganizationsFiltered list organizations matching the query string.
func (*PluggableClient) ListPackageKeys ¶
func (c *PluggableClient) ListPackageKeys(ctx context.Context) ([]masherytypes.PackageKey, error)
func (*PluggableClient) ListPackageKeysFiltered ¶
func (c *PluggableClient) ListPackageKeysFiltered(ctx context.Context, params map[string]string) ([]masherytypes.PackageKey, error)
func (*PluggableClient) ListPackagePlanMethods ¶
func (c *PluggableClient) ListPackagePlanMethods(ctx context.Context, id masherytypes.PackagePlanServiceEndpointIdentifier) ([]masherytypes.PackagePlanServiceEndpointMethod, error)
func (*PluggableClient) ListPackages ¶
func (c *PluggableClient) ListPackages(ctx context.Context) ([]masherytypes.Package, error)
func (*PluggableClient) ListPackagesFiltered ¶
func (c *PluggableClient) ListPackagesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Package, error)
func (*PluggableClient) ListPlanEndpoints ¶
func (c *PluggableClient) ListPlanEndpoints(ctx context.Context, planService masherytypes.PackagePlanServiceIdentifier) ([]masherytypes.AddressableV3Object, error)
func (*PluggableClient) ListPlanServices ¶
func (c *PluggableClient) ListPlanServices(ctx context.Context, ident masherytypes.PackagePlanIdentifier) ([]masherytypes.Service, error)
func (*PluggableClient) ListPlans ¶
func (c *PluggableClient) ListPlans(ctx context.Context, packageId masherytypes.PackageIdentifier) ([]masherytypes.Plan, error)
func (*PluggableClient) ListPlansFiltered ¶
func (c *PluggableClient) ListPlansFiltered(ctx context.Context, packageId masherytypes.PackageIdentifier, params map[string]string) ([]masherytypes.Plan, error)
func (*PluggableClient) ListRoles ¶
func (c *PluggableClient) ListRoles(ctx context.Context) ([]masherytypes.Role, error)
func (*PluggableClient) ListRolesFiltered ¶
func (c *PluggableClient) ListRolesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Role, error)
func (*PluggableClient) ListServices ¶
func (c *PluggableClient) ListServices(ctx context.Context) ([]masherytypes.Service, error)
func (*PluggableClient) ListServicesFiltered ¶
func (c *PluggableClient) ListServicesFiltered(ctx context.Context, params map[string]string) ([]masherytypes.Service, error)
func (*PluggableClient) ResetPackageOwnership ¶
func (c *PluggableClient) ResetPackageOwnership(ctx context.Context, pack masherytypes.PackageIdentifier) (masherytypes.Package, error)
func (*PluggableClient) SetServiceRoles ¶
func (c *PluggableClient) SetServiceRoles(ctx context.Context, serviceId masherytypes.ServiceIdentifier, perms []masherytypes.RolePermission) error
func (*PluggableClient) UpdateApplication ¶
func (c *PluggableClient) UpdateApplication(ctx context.Context, app masherytypes.Application) (masherytypes.Application, error)
func (*PluggableClient) UpdateApplicationExtendedAttributes ¶
func (c *PluggableClient) UpdateApplicationExtendedAttributes(ctx context.Context, appId masherytypes.ApplicationIdentifier, params map[string]string) (map[string]string, error)
func (*PluggableClient) UpdateApplicationPackageKey ¶
func (c *PluggableClient) UpdateApplicationPackageKey(ctx context.Context, packageKey masherytypes.ApplicationPackageKey) (masherytypes.ApplicationPackageKey, error)
func (*PluggableClient) UpdateEndpoint ¶
func (c *PluggableClient) UpdateEndpoint(ctx context.Context, endp masherytypes.Endpoint) (masherytypes.Endpoint, error)
func (*PluggableClient) UpdateEndpointMethod ¶
func (c *PluggableClient) UpdateEndpointMethod(ctx context.Context, methUpsert masherytypes.ServiceEndpointMethod) (masherytypes.ServiceEndpointMethod, error)
func (*PluggableClient) UpdateEndpointMethodFilter ¶
func (c *PluggableClient) UpdateEndpointMethodFilter(ctx context.Context, filterUpsert masherytypes.ServiceEndpointMethodFilter) (masherytypes.ServiceEndpointMethodFilter, error)
func (*PluggableClient) UpdateErrorSet ¶
func (c *PluggableClient) UpdateErrorSet(ctx context.Context, setData masherytypes.ErrorSet) (masherytypes.ErrorSet, error)
func (*PluggableClient) UpdateErrorSetMessage ¶
func (c *PluggableClient) UpdateErrorSetMessage(ctx context.Context, msg masherytypes.MasheryErrorMessage) (masherytypes.MasheryErrorMessage, error)
func (*PluggableClient) UpdateMember ¶
func (c *PluggableClient) UpdateMember(ctx context.Context, member masherytypes.Member) (masherytypes.Member, error)
func (*PluggableClient) UpdatePackage ¶
func (c *PluggableClient) UpdatePackage(ctx context.Context, pack masherytypes.Package) (masherytypes.Package, error)
func (*PluggableClient) UpdatePackageKey ¶
func (c *PluggableClient) UpdatePackageKey(ctx context.Context, packageKey masherytypes.PackageKey) (masherytypes.PackageKey, error)
func (*PluggableClient) UpdatePlan ¶
func (c *PluggableClient) UpdatePlan(ctx context.Context, plan masherytypes.Plan) (masherytypes.Plan, error)
func (*PluggableClient) UpdateService ¶
func (c *PluggableClient) UpdateService(ctx context.Context, service masherytypes.Service) (masherytypes.Service, error)
func (*PluggableClient) UpdateServiceCache ¶
func (c *PluggableClient) UpdateServiceCache(ctx context.Context, service masherytypes.ServiceCache) (masherytypes.ServiceCache, error)
func (*PluggableClient) UpdateServiceOAuthSecurityProfile ¶
func (c *PluggableClient) UpdateServiceOAuthSecurityProfile(ctx context.Context, service masherytypes.MasheryOAuth) (masherytypes.MasheryOAuth, error)
type SupplierCanErr ¶
type V3AccessTokenProvider ¶
type V3AccessTokenProvider interface { transport.Authorizer // AccessToken Yields an access token to be used in the next API call to Mashery AccessToken(context context.Context) (string, error) }
V3AccessTokenProvider Access token provider that supplies the access token, depending on the strategy. There are three strategies: - FixedTokenProvider yields a fixed token. This method is useful for short deployments where an access token is obtained by an outside process and would be stored e.g. in-memory. - FileSystemTokenProvider yields a token that that was previously saved in the file system, e.g. using the `mash-login` command - Both these methods have limited applicability time-span of 1 hour, since Mashery V3 token would expire after 1 hour, and repeated logon would be necessary. - ClientCredentialsProvider can support operations of exceeding 1 hour by using Mashery V3 API to retrieve and refresh the access token.
The calling code has to pick an appropriate provider depending on the context.
func NewContextTokenProvider ¶
func NewContextTokenProvider() V3AccessTokenProvider
func NewFileSystemTokenProvider ¶
func NewFileSystemTokenProvider() V3AccessTokenProvider
func NewFileSystemTokenProviderFrom ¶
func NewFileSystemTokenProviderFrom(path string) V3AccessTokenProvider
func NewFixedTokenProvider ¶
func NewFixedTokenProvider(tkn string) V3AccessTokenProvider
type V3OAuthHelper ¶
type V3OAuthHelper struct { TokenEndpoint string // contains filtered or unexported fields }
func NewOAuthHelper ¶
func NewOAuthHelper(params OAuthHelperParams) *V3OAuthHelper
NewOAuthHelper creates an instance of a helper that could be used directly
func (*V3OAuthHelper) ExchangeRefreshToken ¶
func (lcp *V3OAuthHelper) ExchangeRefreshToken(creds *MasheryV3Credentials, refreshToken string) (*masherytypes.TimedAccessTokenResponse, error)
func (*V3OAuthHelper) RetrieveAccessTokenFor ¶
func (lcp *V3OAuthHelper) RetrieveAccessTokenFor(creds *MasheryV3Credentials) (*masherytypes.TimedAccessTokenResponse, error)
type WildcardClient ¶
type WildcardClient interface { // FetchAny fetch an arbitrary resource from Mashery V3 FetchAny(ctx context.Context, resource string, qs *url.Values) (*transport.WrappedResponse, error) // DeleteAny Delete an arbitrary resource from Mashery V3 DeleteAny(ctx context.Context, resource string) (*transport.WrappedResponse, error) // PostAny post any value to an arbitrary resource PostAny(ctx context.Context, resource string, body interface{}) (*transport.WrappedResponse, error) // PutAny put any value to an arbitrary resource PutAny(ctx context.Context, resource string, body interface{}) (*transport.WrappedResponse, error) Close(ctx context.Context) }
func NewWildcardClient ¶
func NewWildcardClient(params Params) WildcardClient
NewWildcardClient creates a "wildcard" client, which will auto-apply access tokens and will throttle the calls with the specified QPS.
type WildcardClientImpl ¶
type WildcardClientImpl struct {
// contains filtered or unexported fields
}
func (*WildcardClientImpl) Close ¶
func (w *WildcardClientImpl) Close(ctx context.Context)
func (*WildcardClientImpl) DeleteAny ¶
func (w *WildcardClientImpl) DeleteAny(ctx context.Context, resource string) (*transport.WrappedResponse, error)
func (*WildcardClientImpl) FetchAny ¶
func (w *WildcardClientImpl) FetchAny(ctx context.Context, resource string, qs *url.Values) (*transport.WrappedResponse, error)
func (*WildcardClientImpl) PostAny ¶
func (w *WildcardClientImpl) PostAny(ctx context.Context, resource string, body interface{}) (*transport.WrappedResponse, error)
func (*WildcardClientImpl) PutAny ¶
func (w *WildcardClientImpl) PutAny(ctx context.Context, resource string, body interface{}) (*transport.WrappedResponse, error)
Source Files ¶
- WildcardClient.go
- bad_request_autoretry_client.go
- client.go
- clientCredentialsTokenProvider.go
- clientlib_application.go
- clientlib_domains.go
- clientlib_emailTemplateSet.go
- clientlib_endpoint.go
- clientlib_endpoint_method.go
- clientlib_endpoint_method_filter.go
- clientlib_errorSet.go
- clientlib_member.go
- clientlib_organizations.go
- clientlib_package.go
- clientlib_packageKey.go
- clientlib_package_plan.go
- clientlib_package_plan_method.go
- clientlib_package_plan_method_filter.go
- clientlib_roles.go
- clientlib_savedTokenFile.go
- clientlib_service.go
- clientlib_service_cache.go
- clientlib_service_oauth.go
- clientlib_service_roles.go
- clientlib_v3_oauth_helper.go
- constants.go
- contextTokenProvider.go
- fileSystemTokenProvider.go
- fixedTokenProvider.go
- funcsupport.go
- functions.go
- generic_crud.go
- httpClient.go