fake

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespacesServer

type NamespacesServer struct {
	// CheckAvailability is the fake for method NamespacesClient.CheckAvailability
	// HTTP status codes to indicate success: http.StatusOK
	CheckAvailability func(ctx context.Context, parameters armnotificationhubs.CheckAvailabilityParameters, options *armnotificationhubs.NamespacesClientCheckAvailabilityOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientCheckAvailabilityResponse], errResp azfake.ErrorResponder)

	// CreateOrUpdate is the fake for method NamespacesClient.CreateOrUpdate
	// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
	CreateOrUpdate func(ctx context.Context, resourceGroupName string, namespaceName string, parameters armnotificationhubs.NamespaceCreateOrUpdateParameters, options *armnotificationhubs.NamespacesClientCreateOrUpdateOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder)

	// CreateOrUpdateAuthorizationRule is the fake for method NamespacesClient.CreateOrUpdateAuthorizationRule
	// HTTP status codes to indicate success: http.StatusOK
	CreateOrUpdateAuthorizationRule func(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters armnotificationhubs.SharedAccessAuthorizationRuleCreateOrUpdateParameters, options *armnotificationhubs.NamespacesClientCreateOrUpdateAuthorizationRuleOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientCreateOrUpdateAuthorizationRuleResponse], errResp azfake.ErrorResponder)

	// BeginDelete is the fake for method NamespacesClient.BeginDelete
	// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent
	BeginDelete func(ctx context.Context, resourceGroupName string, namespaceName string, options *armnotificationhubs.NamespacesClientBeginDeleteOptions) (resp azfake.PollerResponder[armnotificationhubs.NamespacesClientDeleteResponse], errResp azfake.ErrorResponder)

	// DeleteAuthorizationRule is the fake for method NamespacesClient.DeleteAuthorizationRule
	// HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent
	DeleteAuthorizationRule func(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *armnotificationhubs.NamespacesClientDeleteAuthorizationRuleOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientDeleteAuthorizationRuleResponse], errResp azfake.ErrorResponder)

	// Get is the fake for method NamespacesClient.Get
	// HTTP status codes to indicate success: http.StatusOK
	Get func(ctx context.Context, resourceGroupName string, namespaceName string, options *armnotificationhubs.NamespacesClientGetOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientGetResponse], errResp azfake.ErrorResponder)

	// GetAuthorizationRule is the fake for method NamespacesClient.GetAuthorizationRule
	// HTTP status codes to indicate success: http.StatusOK
	GetAuthorizationRule func(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *armnotificationhubs.NamespacesClientGetAuthorizationRuleOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientGetAuthorizationRuleResponse], errResp azfake.ErrorResponder)

	// NewListPager is the fake for method NamespacesClient.NewListPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListPager func(resourceGroupName string, options *armnotificationhubs.NamespacesClientListOptions) (resp azfake.PagerResponder[armnotificationhubs.NamespacesClientListResponse])

	// NewListAllPager is the fake for method NamespacesClient.NewListAllPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListAllPager func(options *armnotificationhubs.NamespacesClientListAllOptions) (resp azfake.PagerResponder[armnotificationhubs.NamespacesClientListAllResponse])

	// NewListAuthorizationRulesPager is the fake for method NamespacesClient.NewListAuthorizationRulesPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListAuthorizationRulesPager func(resourceGroupName string, namespaceName string, options *armnotificationhubs.NamespacesClientListAuthorizationRulesOptions) (resp azfake.PagerResponder[armnotificationhubs.NamespacesClientListAuthorizationRulesResponse])

	// ListKeys is the fake for method NamespacesClient.ListKeys
	// HTTP status codes to indicate success: http.StatusOK
	ListKeys func(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *armnotificationhubs.NamespacesClientListKeysOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientListKeysResponse], errResp azfake.ErrorResponder)

	// Patch is the fake for method NamespacesClient.Patch
	// HTTP status codes to indicate success: http.StatusOK
	Patch func(ctx context.Context, resourceGroupName string, namespaceName string, parameters armnotificationhubs.NamespacePatchParameters, options *armnotificationhubs.NamespacesClientPatchOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientPatchResponse], errResp azfake.ErrorResponder)

	// RegenerateKeys is the fake for method NamespacesClient.RegenerateKeys
	// HTTP status codes to indicate success: http.StatusOK
	RegenerateKeys func(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters armnotificationhubs.PolicykeyResource, options *armnotificationhubs.NamespacesClientRegenerateKeysOptions) (resp azfake.Responder[armnotificationhubs.NamespacesClientRegenerateKeysResponse], errResp azfake.ErrorResponder)
}

NamespacesServer is a fake server for instances of the armnotificationhubs.NamespacesClient type.

type NamespacesServerTransport

type NamespacesServerTransport struct {
	// contains filtered or unexported fields
}

NamespacesServerTransport connects instances of armnotificationhubs.NamespacesClient to instances of NamespacesServer. Don't use this type directly, use NewNamespacesServerTransport instead.

func NewNamespacesServerTransport

func NewNamespacesServerTransport(srv *NamespacesServer) *NamespacesServerTransport

NewNamespacesServerTransport creates a new instance of NamespacesServerTransport with the provided implementation. The returned NamespacesServerTransport instance is connected to an instance of armnotificationhubs.NamespacesClient via the azcore.ClientOptions.Transporter field in the client's constructor parameters.

func (*NamespacesServerTransport) Do

Do implements the policy.Transporter interface for NamespacesServerTransport.

type OperationsServer

type OperationsServer struct {
	// NewListPager is the fake for method OperationsClient.NewListPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListPager func(options *armnotificationhubs.OperationsClientListOptions) (resp azfake.PagerResponder[armnotificationhubs.OperationsClientListResponse])
}

OperationsServer is a fake server for instances of the armnotificationhubs.OperationsClient type.

type OperationsServerTransport

type OperationsServerTransport struct {
	// contains filtered or unexported fields
}

OperationsServerTransport connects instances of armnotificationhubs.OperationsClient to instances of OperationsServer. Don't use this type directly, use NewOperationsServerTransport instead.

func NewOperationsServerTransport

func NewOperationsServerTransport(srv *OperationsServer) *OperationsServerTransport

NewOperationsServerTransport creates a new instance of OperationsServerTransport with the provided implementation. The returned OperationsServerTransport instance is connected to an instance of armnotificationhubs.OperationsClient via the azcore.ClientOptions.Transporter field in the client's constructor parameters.

func (*OperationsServerTransport) Do

Do implements the policy.Transporter interface for OperationsServerTransport.

type Server

type Server struct {
	// CheckNotificationHubAvailability is the fake for method Client.CheckNotificationHubAvailability
	// HTTP status codes to indicate success: http.StatusOK
	CheckNotificationHubAvailability func(ctx context.Context, resourceGroupName string, namespaceName string, parameters armnotificationhubs.CheckAvailabilityParameters, options *armnotificationhubs.ClientCheckNotificationHubAvailabilityOptions) (resp azfake.Responder[armnotificationhubs.ClientCheckNotificationHubAvailabilityResponse], errResp azfake.ErrorResponder)

	// CreateOrUpdate is the fake for method Client.CreateOrUpdate
	// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
	CreateOrUpdate func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters armnotificationhubs.NotificationHubCreateOrUpdateParameters, options *armnotificationhubs.ClientCreateOrUpdateOptions) (resp azfake.Responder[armnotificationhubs.ClientCreateOrUpdateResponse], errResp azfake.ErrorResponder)

	// CreateOrUpdateAuthorizationRule is the fake for method Client.CreateOrUpdateAuthorizationRule
	// HTTP status codes to indicate success: http.StatusOK
	CreateOrUpdateAuthorizationRule func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters armnotificationhubs.SharedAccessAuthorizationRuleCreateOrUpdateParameters, options *armnotificationhubs.ClientCreateOrUpdateAuthorizationRuleOptions) (resp azfake.Responder[armnotificationhubs.ClientCreateOrUpdateAuthorizationRuleResponse], errResp azfake.ErrorResponder)

	// DebugSend is the fake for method Client.DebugSend
	// HTTP status codes to indicate success: http.StatusCreated
	DebugSend func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *armnotificationhubs.ClientDebugSendOptions) (resp azfake.Responder[armnotificationhubs.ClientDebugSendResponse], errResp azfake.ErrorResponder)

	// Delete is the fake for method Client.Delete
	// HTTP status codes to indicate success: http.StatusOK
	Delete func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *armnotificationhubs.ClientDeleteOptions) (resp azfake.Responder[armnotificationhubs.ClientDeleteResponse], errResp azfake.ErrorResponder)

	// DeleteAuthorizationRule is the fake for method Client.DeleteAuthorizationRule
	// HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent
	DeleteAuthorizationRule func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, options *armnotificationhubs.ClientDeleteAuthorizationRuleOptions) (resp azfake.Responder[armnotificationhubs.ClientDeleteAuthorizationRuleResponse], errResp azfake.ErrorResponder)

	// Get is the fake for method Client.Get
	// HTTP status codes to indicate success: http.StatusOK
	Get func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *armnotificationhubs.ClientGetOptions) (resp azfake.Responder[armnotificationhubs.ClientGetResponse], errResp azfake.ErrorResponder)

	// GetAuthorizationRule is the fake for method Client.GetAuthorizationRule
	// HTTP status codes to indicate success: http.StatusOK
	GetAuthorizationRule func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, options *armnotificationhubs.ClientGetAuthorizationRuleOptions) (resp azfake.Responder[armnotificationhubs.ClientGetAuthorizationRuleResponse], errResp azfake.ErrorResponder)

	// GetPnsCredentials is the fake for method Client.GetPnsCredentials
	// HTTP status codes to indicate success: http.StatusOK
	GetPnsCredentials func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *armnotificationhubs.ClientGetPnsCredentialsOptions) (resp azfake.Responder[armnotificationhubs.ClientGetPnsCredentialsResponse], errResp azfake.ErrorResponder)

	// NewListPager is the fake for method Client.NewListPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListPager func(resourceGroupName string, namespaceName string, options *armnotificationhubs.ClientListOptions) (resp azfake.PagerResponder[armnotificationhubs.ClientListResponse])

	// NewListAuthorizationRulesPager is the fake for method Client.NewListAuthorizationRulesPager
	// HTTP status codes to indicate success: http.StatusOK
	NewListAuthorizationRulesPager func(resourceGroupName string, namespaceName string, notificationHubName string, options *armnotificationhubs.ClientListAuthorizationRulesOptions) (resp azfake.PagerResponder[armnotificationhubs.ClientListAuthorizationRulesResponse])

	// ListKeys is the fake for method Client.ListKeys
	// HTTP status codes to indicate success: http.StatusOK
	ListKeys func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, options *armnotificationhubs.ClientListKeysOptions) (resp azfake.Responder[armnotificationhubs.ClientListKeysResponse], errResp azfake.ErrorResponder)

	// Patch is the fake for method Client.Patch
	// HTTP status codes to indicate success: http.StatusOK
	Patch func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *armnotificationhubs.ClientPatchOptions) (resp azfake.Responder[armnotificationhubs.ClientPatchResponse], errResp azfake.ErrorResponder)

	// RegenerateKeys is the fake for method Client.RegenerateKeys
	// HTTP status codes to indicate success: http.StatusOK
	RegenerateKeys func(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters armnotificationhubs.PolicykeyResource, options *armnotificationhubs.ClientRegenerateKeysOptions) (resp azfake.Responder[armnotificationhubs.ClientRegenerateKeysResponse], errResp azfake.ErrorResponder)
}

Server is a fake server for instances of the armnotificationhubs.Client type.

type ServerFactory

type ServerFactory struct {
	Server           Server
	NamespacesServer NamespacesServer
	OperationsServer OperationsServer
}

ServerFactory is a fake server for instances of the armnotificationhubs.ClientFactory type.

type ServerFactoryTransport

type ServerFactoryTransport struct {
	// contains filtered or unexported fields
}

ServerFactoryTransport connects instances of armnotificationhubs.ClientFactory to instances of ServerFactory. Don't use this type directly, use NewServerFactoryTransport instead.

func NewServerFactoryTransport

func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport

NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. The returned ServerFactoryTransport instance is connected to an instance of armnotificationhubs.ClientFactory via the azcore.ClientOptions.Transporter field in the client's constructor parameters.

func (*ServerFactoryTransport) Do

Do implements the policy.Transporter interface for ServerFactoryTransport.

type ServerTransport

type ServerTransport struct {
	// contains filtered or unexported fields
}

ServerTransport connects instances of armnotificationhubs.Client to instances of Server. Don't use this type directly, use NewServerTransport instead.

func NewServerTransport

func NewServerTransport(srv *Server) *ServerTransport

NewServerTransport creates a new instance of ServerTransport with the provided implementation. The returned ServerTransport instance is connected to an instance of armnotificationhubs.Client via the azcore.ClientOptions.Transporter field in the client's constructor parameters.

func (*ServerTransport) Do

func (s *ServerTransport) Do(req *http.Request) (*http.Response, error)

Do implements the policy.Transporter interface for ServerTransport.

Jump to

Keyboard shortcuts

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