mock

package
v1.1.90 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	SetTokenGetterMock                                       func(tokenRequester auth.PlatformTokenGetter)
	SetConfigMock                                            func(cfg corecfg.CentralConfig)
	PublishServiceMock                                       func(serviceBody *apic.ServiceBody) (*management.APIService, error)
	RegisterSubscriptionWebhookMock                          func() error
	RegisterSubscriptionSchemaMock                           func(subscriptionSchema apic.SubscriptionSchema, update bool) error
	UpdateSubscriptionSchemaMock                             func(subscriptionSchema apic.SubscriptionSchema) error
	GetSubscriptionManagerMock                               func() apic.SubscriptionManager
	GetCatalogItemIDForConsumerInstanceMock                  func(instanceID string) (string, error)
	DeleteAPIServiceInstanceMock                             func(name string) error
	DeleteConsumerInstanceMock                               func(name string) error
	DeleteServiceByNameMock                                  func(name string) error
	GetConsumerInstanceByIDMock                              func(consumerInstanceID string) (*management.ConsumerInstance, error)
	GetConsumerInstancesByExternalAPIIDMock                  func(externalAPIID string) ([]*management.ConsumerInstance, error)
	UpdateConsumerInstanceSubscriptionDefinitionMock         func(externalAPIID, subscriptionDefinitionName string) error
	GetUserEmailAddressMock                                  func(ID string) (string, error)
	GetUserNameMock                                          func(ID string) (string, error)
	GetSubscriptionsForCatalogItemMock                       func(states []string, catalogItemID string) ([]apic.CentralSubscription, error)
	GetSubscriptionDefinitionPropertiesForCatalogItemMock    func(catalogItemID, propertyKey string) (apic.SubscriptionSchema, error)
	UpdateSubscriptionDefinitionPropertiesForCatalogItemMock func(catalogItemID, propertyKey string, subscriptionSchema apic.SubscriptionSchema) error
	GetCatalogItemNameMock                                   func(ID string) (string, error)
	ExecuteAPIMock                                           func(method, url string, queryParam map[string]string, buffer []byte) ([]byte, error)
	HealthcheckMock                                          func(name string) *hc.Status
	GetAPIRevisionsMock                                      func(queryParams map[string]string, stage string) ([]*management.APIServiceRevision, error)
	GetAPIServiceRevisionsMock                               func(queryParams map[string]string, URL, stage string) ([]*management.APIServiceRevision, error)
	GetAPIServiceInstancesMock                               func(queryParams map[string]string, URL string) ([]*management.APIServiceInstance, error)
	GetAPIV1ResourceInstancesMock                            func(queryParams map[string]string, URL string) ([]*v1.ResourceInstance, error)
	GetAPIV1ResourceInstancesWithPageSizeMock                func(queryParams map[string]string, URL string, pageSize int) ([]*v1.ResourceInstance, error)
	GetAPIServiceByNameMock                                  func(serviceName string) (*management.APIService, error)
	GetAPIServiceInstanceByNameMock                          func(serviceInstanceName string) (*management.APIServiceInstance, error)
	GetAPIRevisionByNameMock                                 func(serviceRevisionName string) (*management.APIServiceRevision, error)
	CreateCategoryMock                                       func(categoryName string) (*catalog.Category, error)
	GetOrCreateCategoryMock                                  func(category string) string
	GetEnvironmentMock                                       func() (*management.Environment, error)
	GetCentralTeamByNameMock                                 func(teamName string) (*definitions.PlatformTeam, error)
	GetTeamMock                                              func(queryParams map[string]string) ([]definitions.PlatformTeam, error)
	GetAccessControlListMock                                 func(aclName string) (*management.AccessControlList, error)
	UpdateAccessControlListMock                              func(acl *management.AccessControlList) (*management.AccessControlList, error)
	CreateAccessControlListMock                              func(acl *management.AccessControlList) (*management.AccessControlList, error)
	UpdateResourceInstanceMock                               func(ri v1.Interface) (*v1.ResourceInstance, error)
	CreateResourceInstanceMock                               func(ri v1.Interface) (*v1.ResourceInstance, error)
	PatchSubResourceMock                                     func(ri v1.Interface, subResourceName string, patches []map[string]interface{}) (*v1.ResourceInstance, error)
	DeleteResourceInstanceMock                               func(ri v1.Interface) error
	CreateSubResourceMock                                    func(rm v1.ResourceMeta, subs map[string]interface{}) error
	GetResourceMock                                          func(url string) (*v1.ResourceInstance, error)
	GetResourcesMock                                         func(ri v1.Interface) ([]v1.Interface, error)
	CreateResourceMock                                       func(url string, bts []byte) (*v1.ResourceInstance, error)
	UpdateResourceMock                                       func(url string, bts []byte) (*v1.ResourceInstance, error)
	UpdateResourceFinalizerMock                              func(res *v1.ResourceInstance, finalizer, description string, addAction bool) (*v1.ResourceInstance, error)
	CreateOrUpdateResourceMock                               func(v1.Interface) (*v1.ResourceInstance, error)
	IsMarketplaceSubsEnabledMock                             func() bool
}

func (*Client) CreateAccessControlList

func (m *Client) CreateAccessControlList(acl *management.AccessControlList) (*management.AccessControlList, error)

func (*Client) CreateCategory

func (m *Client) CreateCategory(categoryName string) (*catalog.Category, error)

func (*Client) CreateOrUpdateResource

func (m *Client) CreateOrUpdateResource(iface v1.Interface) (*v1.ResourceInstance, error)

func (*Client) CreateResource

func (m *Client) CreateResource(url string, bts []byte) (*v1.ResourceInstance, error)

func (*Client) CreateResourceInstance

func (m *Client) CreateResourceInstance(ri v1.Interface) (*v1.ResourceInstance, error)

func (*Client) CreateSubResource

func (m *Client) CreateSubResource(rm v1.ResourceMeta, subs map[string]interface{}) error

func (*Client) DeleteAPIServiceInstance

func (m *Client) DeleteAPIServiceInstance(instanceName string) error

func (*Client) DeleteConsumerInstance

func (m *Client) DeleteConsumerInstance(instanceName string) error

func (*Client) DeleteResourceInstance

func (m *Client) DeleteResourceInstance(ri v1.Interface) error

func (*Client) DeleteServiceByName

func (m *Client) DeleteServiceByName(serviceName string) error

func (*Client) ExecuteAPI

func (m *Client) ExecuteAPI(method, url string, queryParam map[string]string, buffer []byte) ([]byte, error)

func (*Client) GetAPIRevisionByName

func (m *Client) GetAPIRevisionByName(revisionName string) (*management.APIServiceRevision, error)

func (*Client) GetAPIRevisions

func (m *Client) GetAPIRevisions(queryParams map[string]string, stage string) ([]*management.APIServiceRevision, error)

func (*Client) GetAPIServiceByName

func (m *Client) GetAPIServiceByName(serviceName string) (*management.APIService, error)

func (*Client) GetAPIServiceInstanceByName

func (m *Client) GetAPIServiceInstanceByName(instanceName string) (*management.APIServiceInstance, error)

func (*Client) GetAPIServiceInstances

func (m *Client) GetAPIServiceInstances(queryParams map[string]string, URL string) ([]*management.APIServiceInstance, error)

func (*Client) GetAPIServiceRevisions

func (m *Client) GetAPIServiceRevisions(queryParams map[string]string, URL, stage string) ([]*management.APIServiceRevision, error)

func (*Client) GetAPIV1ResourceInstances

func (m *Client) GetAPIV1ResourceInstances(queryParams map[string]string, URL string) ([]*v1.ResourceInstance, error)

func (*Client) GetAPIV1ResourceInstancesWithPageSize

func (m *Client) GetAPIV1ResourceInstancesWithPageSize(queryParams map[string]string, URL string, pageSize int) ([]*v1.ResourceInstance, error)

func (*Client) GetAccessControlList

func (m *Client) GetAccessControlList(aclName string) (*management.AccessControlList, error)

func (*Client) GetCatalogItemIDForConsumerInstance

func (m *Client) GetCatalogItemIDForConsumerInstance(instanceID string) (string, error)

func (*Client) GetCatalogItemName

func (m *Client) GetCatalogItemName(ID string) (string, error)

func (*Client) GetCentralTeamByName

func (m *Client) GetCentralTeamByName(teamName string) (*definitions.PlatformTeam, error)

func (*Client) GetConsumerInstanceByID

func (m *Client) GetConsumerInstanceByID(consumerInstanceID string) (*management.ConsumerInstance, error)

func (*Client) GetConsumerInstancesByExternalAPIID

func (m *Client) GetConsumerInstancesByExternalAPIID(consumerInstanceID string) ([]*management.ConsumerInstance, error)

func (*Client) GetEnvironment

func (m *Client) GetEnvironment() (*management.Environment, error)

func (*Client) GetOrCreateCategory

func (m *Client) GetOrCreateCategory(category string) string

func (*Client) GetResource

func (m *Client) GetResource(url string) (*v1.ResourceInstance, error)

func (*Client) GetResources added in v1.1.33

func (m *Client) GetResources(ri v1.Interface) ([]v1.Interface, error)

func (*Client) GetSubscriptionDefinitionPropertiesForCatalogItem

func (m *Client) GetSubscriptionDefinitionPropertiesForCatalogItem(catalogItemID, propertyKey string) (apic.SubscriptionSchema, error)

func (*Client) GetSubscriptionManager

func (m *Client) GetSubscriptionManager() apic.SubscriptionManager

func (*Client) GetSubscriptionsForCatalogItem

func (m *Client) GetSubscriptionsForCatalogItem(states []string, instanceID string) ([]apic.CentralSubscription, error)

func (*Client) GetTeam

func (m *Client) GetTeam(queryParams map[string]string) ([]definitions.PlatformTeam, error)

func (*Client) GetUserEmailAddress

func (m *Client) GetUserEmailAddress(ID string) (string, error)

func (*Client) GetUserName

func (m *Client) GetUserName(ID string) (string, error)

func (*Client) Healthcheck

func (m *Client) Healthcheck(name string) *hc.Status

func (*Client) IsMarketplaceSubsEnabled

func (m *Client) IsMarketplaceSubsEnabled() bool

func (*Client) PatchSubResource added in v1.1.79

func (m *Client) PatchSubResource(ri v1.Interface, subResourceName string, patches []map[string]interface{}) (*v1.ResourceInstance, error)

func (*Client) PublishService

func (m *Client) PublishService(serviceBody *apic.ServiceBody) (*management.APIService, error)

func (*Client) RegisterSubscriptionSchema

func (m *Client) RegisterSubscriptionSchema(subscriptionSchema apic.SubscriptionSchema, update bool) error

func (*Client) RegisterSubscriptionWebhook

func (m *Client) RegisterSubscriptionWebhook() error

func (*Client) SetConfig

func (m *Client) SetConfig(cfg corecfg.CentralConfig)

func (*Client) SetTokenGetter

func (m *Client) SetTokenGetter(tokenGetter auth.PlatformTokenGetter)

func (*Client) UpdateAccessControlList

func (m *Client) UpdateAccessControlList(acl *management.AccessControlList) (*management.AccessControlList, error)

func (*Client) UpdateConsumerInstanceSubscriptionDefinition

func (m *Client) UpdateConsumerInstanceSubscriptionDefinition(externalAPIID, subscriptionDefinitionName string) error

func (*Client) UpdateResource

func (m *Client) UpdateResource(url string, bts []byte) (*v1.ResourceInstance, error)

func (*Client) UpdateResourceFinalizer

func (m *Client) UpdateResourceFinalizer(res *v1.ResourceInstance, finalizer, description string, addAction bool) (*v1.ResourceInstance, error)

func (*Client) UpdateResourceInstance

func (m *Client) UpdateResourceInstance(ri v1.Interface) (*v1.ResourceInstance, error)

func (*Client) UpdateSubscriptionDefinitionPropertiesForCatalogItem

func (m *Client) UpdateSubscriptionDefinitionPropertiesForCatalogItem(catalogItemID, propertyKey string, subscriptionSchema apic.SubscriptionSchema) error

func (*Client) UpdateSubscriptionSchema

func (m *Client) UpdateSubscriptionSchema(subscriptionSchema apic.SubscriptionSchema) error

Jump to

Keyboard shortcuts

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