mock

package
v1.1.96 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 7 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)
	DeleteAPIServiceInstanceMock              func(name string) error
	DeleteServiceByNameMock                   func(name string) error
	GetUserEmailAddressMock                   func(ID string) (string, error)
	GetUserNameMock                           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)
	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)
}

func (*Client) CreateAccessControlList

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

CreateAccessControlList -

func (*Client) CreateOrUpdateResource

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

CreateOrUpdateResource -

func (*Client) CreateResource

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

CreateResource -

func (*Client) CreateResourceInstance

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

CreateResourceInstance -

func (*Client) CreateSubResource

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

CreateSubResource -

func (*Client) DeleteAPIServiceInstance

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

DeleteAPIServiceInstance -

func (*Client) DeleteResourceInstance

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

DeleteResourceInstance -

func (*Client) DeleteServiceByName

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

DeleteServiceByName -

func (*Client) ExecuteAPI

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

ExecuteAPI -

func (*Client) GetAPIRevisionByName

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

GetAPIRevisionByName -

func (*Client) GetAPIRevisions

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

GetAPIRevisions -

func (*Client) GetAPIServiceByName

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

GetAPIServiceByName -

func (*Client) GetAPIServiceInstanceByName

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

GetAPIServiceInstanceByName -

func (*Client) GetAPIServiceInstances

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

GetAPIServiceInstances -

func (*Client) GetAPIServiceRevisions

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

GetAPIServiceRevisions -

func (*Client) GetAPIV1ResourceInstances

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

GetAPIV1ResourceInstances -

func (*Client) GetAPIV1ResourceInstancesWithPageSize

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

GetAPIV1ResourceInstancesWithPageSize -

func (*Client) GetAccessControlList

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

GetAccessControlList -

func (*Client) GetCentralTeamByName

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

GetCentralTeamByName -

func (*Client) GetEnvironment

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

GetEnvironment -

func (*Client) GetResource

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

GetResource -

func (*Client) GetResources added in v1.1.33

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

GetResources -

func (*Client) GetTeam

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

GetTeam -

func (*Client) GetUserEmailAddress

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

GetUserEmailAddress -

func (*Client) GetUserName

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

GetUserName -

func (*Client) Healthcheck

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

Healthcheck -

func (*Client) PatchSubResource added in v1.1.79

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

PatchSubResource -

func (*Client) PublishService

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

PublishService -

func (*Client) SetConfig

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

SetConfig -

func (*Client) SetTokenGetter

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

SetTokenGetter -

func (*Client) UpdateAccessControlList

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

UpdateAccessControlList -

func (*Client) UpdateResource

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

UpdateResource -

func (*Client) UpdateResourceFinalizer

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

UpdateResourceFinalizer -

func (*Client) UpdateResourceInstance

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

UpdateResourceInstance -

Jump to

Keyboard shortcuts

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