fake

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationsServer

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

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

type OperationsServerTransport

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

OperationsServerTransport connects instances of armresourcegraph.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 armresourcegraph.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 {
	// Resources is the fake for method Client.Resources
	// HTTP status codes to indicate success: http.StatusOK
	Resources func(ctx context.Context, query armresourcegraph.QueryRequest, options *armresourcegraph.ClientResourcesOptions) (resp azfake.Responder[armresourcegraph.ClientResourcesResponse], errResp azfake.ErrorResponder)

	// ResourcesHistory is the fake for method Client.ResourcesHistory
	// HTTP status codes to indicate success: http.StatusOK
	ResourcesHistory func(ctx context.Context, request armresourcegraph.ResourcesHistoryRequest, options *armresourcegraph.ClientResourcesHistoryOptions) (resp azfake.Responder[armresourcegraph.ClientResourcesHistoryResponse], errResp azfake.ErrorResponder)
}

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

type ServerFactory added in v0.9.0

type ServerFactory struct {
	Server           Server
	OperationsServer OperationsServer
}

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

type ServerFactoryTransport added in v0.9.0

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

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

func NewServerFactoryTransport added in v0.9.0

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 armresourcegraph.ClientFactory via the azcore.ClientOptions.Transporter field in the client's constructor parameters.

func (*ServerFactoryTransport) Do added in v0.9.0

Do implements the policy.Transporter interface for ServerFactoryTransport.

type ServerTransport

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

ServerTransport connects instances of armresourcegraph.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 armresourcegraph.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