developer

package module
v0.0.0-...-f4072d1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DPGClient

type DPGClient struct {
	// contains filtered or unexported fields

} // find a way separate protocol client and model client to make it possible to reuse operation name

func NewDPGClient

func NewDPGClient(pl runtime.Pipeline) *DPGClient

NewDPGClient creates a new instance of DPGClient with the specified values. pl - the pipeline used for sending requests and handling responses.

func (*DPGClient) BeginLro

BeginLro - Long running put request that will either return to end users a final payload of a raw body, or a final payload of a model after the SDK has grown up. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 1.0.0 mode - The mode with which you'll be handling your returned body. 'raw' for just dealing with the raw body, and 'model' if you are going to convert the raw body to a customized body before returning to users. options - DPGClientBeginLroOptions contains the optional parameters for the DPGClient.BeginLro method.

func (*DPGClient) BeginLroRaw

func (client *DPGClient) BeginLroRaw(ctx context.Context, mode string, options *LRORequestOptions) (*runtime.Poller[[]byte], error)

TODO, current implementation can not work, need to change azcore.

func (*DPGClient) GetModel

func (client *DPGClient) GetModel(ctx context.Context, mode string, options *DPGClientGetModelOptions) (DPGClientGetModelResponse, error)

func (*DPGClient) GetModelRaw

func (client *DPGClient) GetModelRaw(ctx context.Context, mode string, options *RequestOptions) ([]byte, error)

func (*DPGClient) NewGetPagesPager

func (client *DPGClient) NewGetPagesPager(mode string, options *DPGClientGetPagesOptions) *runtime.Pager[DPGClientGetPagesResponse]

NewGetPagesPager - Get pages that you will either return to users in pages of raw bodies, or pages of models following growup. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 1.0.0 mode - The mode with which you'll be handling your returned body. 'raw' for just dealing with the raw body, and 'model' if you are going to convert the raw body to a customized body before returning to users. options - DPGClientGetPagesOptions contains the optional parameters for the DPGClient.GetPages method.

func (*DPGClient) NewGetPagesPagerRaw

func (client *DPGClient) NewGetPagesPagerRaw(mode string, options *RequestOptions) *runtime.Pager[[]byte]

func (*DPGClient) PostModel

func (client *DPGClient) PostModel(ctx context.Context, mode string, input Input, options *DPGClientPostModelOptions) (DPGClientPostModelResponse, error)

func (*DPGClient) PostModelRaw

func (client *DPGClient) PostModelRaw(ctx context.Context, mode string, options *RequestOptions) ([]byte, error)

func (*DPGClient) SendRequest

func (client *DPGClient) SendRequest(ctx context.Context, urlPath, httpMethod string, query map[string]string, header http.Header, body io.ReadSeekCloser) ([]byte, error)

type DPGClientBeginLroOptions

type DPGClientBeginLroOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DPGClientBeginLroOptions contains the optional parameters for the DPGClient.BeginLro method.

type DPGClientGetModelOptions

type DPGClientGetModelOptions struct {
}

DPGClientGetModelOptions contains the optional parameters for the DPGClient.GetModel method.

type DPGClientGetModelResponse

type DPGClientGetModelResponse struct {
	Product
}

DPGClientGetModelResponse contains the response from method DPGClient.GetModel.

type DPGClientGetPagesOptions

type DPGClientGetPagesOptions struct {
}

DPGClientGetPagesOptions contains the optional parameters for the DPGClient.GetPages method.

type DPGClientGetPagesResponse

type DPGClientGetPagesResponse struct {
	ProductResult
}

DPGClientGetPagesResponse contains the response from method DPGClient.GetPages.

type DPGClientLroResponse

type DPGClientLroResponse struct {
	LROProduct
}

DPGClientLroResponse contains the response from method DPGClient.Lro.

type DPGClientPostModelOptions

type DPGClientPostModelOptions struct {
}

DPGClientPostModelOptions contains the optional parameters for the DPGClient.PostModel method.

type DPGClientPostModelResponse

type DPGClientPostModelResponse struct {
	Product
}

DPGClientPostModelResponse contains the response from method DPGClient.PostModel.

type GlassBreakerClient

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

func NewGlassBreakerClient

func NewGlassBreakerClient(pl runtime.Pipeline) *GlassBreakerClient

func (*GlassBreakerClient) SendRequest

func (client *GlassBreakerClient) SendRequest(ctx context.Context, urlPath, httpMethod string, query map[string]string, header http.Header, body io.ReadSeekCloser) ([]byte, error)

type Input

type Input struct {
	// REQUIRED
	Hello *string `json:"hello,omitempty"`
}

func (Input) MarshalJSON

func (i Input) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Input.

func (*Input) UnmarshalJSON

func (i *Input) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Input.

type LROProduct

type LROProduct struct {
	// REQUIRED
	ProvisioningState *string `json:"provisioningState,omitempty"`

	// REQUIRED
	Received *ProductReceived `json:"received,omitempty"`
}

func (LROProduct) MarshalJSON

func (l LROProduct) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LROProduct.

func (*LROProduct) UnmarshalJSON

func (l *LROProduct) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LROProduct.

type LRORequestOptions

type LRORequestOptions struct {
	RequestOptions
	ResumeToken string
}

type Product

type Product struct {
	// REQUIRED
	Received *ProductReceived `json:"received,omitempty"`
}

func (Product) MarshalJSON

func (p Product) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Product.

func (*Product) UnmarshalJSON

func (p *Product) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Product.

type ProductReceived

type ProductReceived string
const (
	ProductReceivedModel ProductReceived = "model"
	ProductReceivedRaw   ProductReceived = "raw"
)

func PossibleProductReceivedValues

func PossibleProductReceivedValues() []ProductReceived

PossibleProductReceivedValues returns the possible values for the ProductReceived const type.

type ProductResult

type ProductResult struct {
	NextLink *string    `json:"nextLink,omitempty"`
	Values   []*Product `json:"values,omitempty"`
}

func (ProductResult) MarshalJSON

func (p ProductResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductResult.

func (*ProductResult) UnmarshalJSON

func (p *ProductResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductResult.

type RequestOptions

type RequestOptions struct {
	Header      http.Header
	QueryParam  map[string]string // type alias and provide set add method
	Body        io.ReadSeekCloser
	ContentType string // find some way to infer from body
}

func NewFormDataRequest

func NewFormDataRequest(data url.Values) RequestOptions

func NewJSONStringRequest

func NewJSONStringRequest(body string) RequestOptions

func (*RequestOptions) AddQueryParam

func (options *RequestOptions) AddQueryParam(name, value string)

Jump to

Keyboard shortcuts

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