fake

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// GetSetting is the fake for method Client.GetSetting
	// HTTP status codes to indicate success: http.StatusOK
	GetSetting func(ctx context.Context, settingName string, options *settings.GetSettingOptions) (resp azfake.Responder[settings.GetSettingResponse], errResp azfake.ErrorResponder)

	// GetSettings is the fake for method Client.GetSettings
	// HTTP status codes to indicate success: http.StatusOK
	GetSettings func(ctx context.Context, options *settings.GetSettingsOptions) (resp azfake.Responder[settings.GetSettingsResponse], errResp azfake.ErrorResponder)

	// UpdateSetting is the fake for method Client.UpdateSetting
	// HTTP status codes to indicate success: http.StatusOK
	UpdateSetting func(ctx context.Context, settingName string, parameters settings.UpdateSettingRequest, options *settings.UpdateSettingOptions) (resp azfake.Responder[settings.UpdateSettingResponse], errResp azfake.ErrorResponder)
}

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

type ServerTransport

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

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