client_demo

package
v1.17.6 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidDemoProtocol = errors.New("invalid DemoProtocol type")

Functions

This section is empty.

Types

type BytesBuffer

type BytesBuffer = bytes.Buffer

type ClientDemo added in v1.6.0

type ClientDemo interface {
	WithContext(context.Context) ClientDemo
	Context() context.Context
	Cookie(req *Cookie, metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	Create(req *Create, metas ...github_com_go_courier_courier.Metadata) (*Data, github_com_go_courier_courier.Metadata, error)
	DownloadFile(metas ...github_com_go_courier_courier.Metadata) (*GithubComGoCourierHttptransportHttpxAttachment, github_com_go_courier_courier.Metadata, error)
	FormMultipartWithFile(req *FormMultipartWithFile, metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	FormMultipartWithFiles(req *FormMultipartWithFiles, metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	FormURLEncoded(req *FormURLEncoded, metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	GetByID(req *GetByID, metas ...github_com_go_courier_courier.Metadata) (*Data, github_com_go_courier_courier.Metadata, error)
	HealthCheck(metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	Proxy(metas ...github_com_go_courier_courier.Metadata) (*IpInfo, github_com_go_courier_courier.Metadata, error)
	ProxyV2(metas ...github_com_go_courier_courier.Metadata) (*IpInfo, github_com_go_courier_courier.Metadata, error)
	Redirect(metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	RedirectWhenError(metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	RemoveByID(req *RemoveByID, metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
	ShowImage(metas ...github_com_go_courier_courier.Metadata) (*GithubComGoCourierHttptransportHttpxImagePNG, github_com_go_courier_courier.Metadata, error)
	UpdateByID(req *UpdateByID, metas ...github_com_go_courier_courier.Metadata) (github_com_go_courier_courier.Metadata, error)
}

type ClientDemoStruct added in v1.6.0

type ClientDemoStruct struct {
	Client github_com_go_courier_courier.Client
	// contains filtered or unexported fields
}

func NewClientDemo added in v1.6.0

func (*ClientDemoStruct) Context added in v1.7.0

func (c *ClientDemoStruct) Context() context.Context

func (*ClientDemoStruct) Cookie added in v1.6.0

func (*ClientDemoStruct) Create added in v1.6.0

func (*ClientDemoStruct) FormMultipartWithFile added in v1.6.0

func (*ClientDemoStruct) FormMultipartWithFiles added in v1.6.0

func (*ClientDemoStruct) FormURLEncoded added in v1.6.0

func (*ClientDemoStruct) GetByID added in v1.6.0

func (*ClientDemoStruct) HealthCheck added in v1.6.0

func (*ClientDemoStruct) Proxy added in v1.12.0

func (*ClientDemoStruct) ProxyV2 added in v1.16.0

func (*ClientDemoStruct) Redirect added in v1.6.0

func (*ClientDemoStruct) RedirectWhenError added in v1.6.0

func (*ClientDemoStruct) RemoveByID added in v1.6.0

func (*ClientDemoStruct) UpdateByID added in v1.6.0

func (*ClientDemoStruct) WithContext added in v1.7.0

func (c *ClientDemoStruct) WithContext(ctx context.Context) ClientDemo
type Cookie struct {
	Token string `in:"cookie" name:"token,omitempty"`
}

func (Cookie) Method

func (Cookie) Method() string

func (Cookie) Path

func (Cookie) Path() string

type Create

type Create struct {
	Data Data `in:"body"`
}

func (Create) Method

func (Create) Method() string

func (Create) Path

func (Create) Path() string

type Data

type Data struct {
	ID        string   `json:"id"`
	Label     string   `json:"label"`
	Protocol  Protocol `json:"protocol,omitempty"`
	PtrString *string  `json:"ptrString,omitempty"`
	SubData   *SubData `json:"subData,omitempty"`
}

type DemoProtocol

type DemoProtocol int

openapi:enum

const (
	DEMO_PROTOCOL_UNKNOWN DemoProtocol = iota
	DEMO_PROTOCOL__HTTP                // http
	DEMO_PROTOCOL__HTTPS               // https
)
const (
	DEMO_PROTOCOL__TCP DemoProtocol = iota + 6 // TCP
)

func ParseDemoProtocolFromLabelString

func ParseDemoProtocolFromLabelString(s string) (DemoProtocol, error)

func ParseDemoProtocolFromString

func ParseDemoProtocolFromString(s string) (DemoProtocol, error)

func (DemoProtocol) ConstValues

func (DemoProtocol) Int

func (v DemoProtocol) Int() int

func (DemoProtocol) Label

func (v DemoProtocol) Label() string

func (DemoProtocol) MarshalText

func (v DemoProtocol) MarshalText() ([]byte, error)

func (*DemoProtocol) Scan

func (v *DemoProtocol) Scan(src interface{}) error

func (DemoProtocol) String

func (v DemoProtocol) String() string

func (DemoProtocol) TypeName

func (DemoProtocol) TypeName() string

func (*DemoProtocol) UnmarshalText

func (v *DemoProtocol) UnmarshalText(data []byte) (err error)

func (DemoProtocol) Value

type FormMultipartWithFile

type FormMultipartWithFile struct {
	FormData struct {
		Data  Data                       `name:"data,omitempty"`
		File  *mime_multipart.FileHeader `name:"file"`
		Map   map[Protocol]int32         `name:"map,omitempty"`
		Slice []string                   `name:"slice,omitempty"`
		// @deprecated
		String string `name:"string,omitempty"`
	} `in:"body" mime:"multipart"`
}

func (FormMultipartWithFile) Method

func (FormMultipartWithFile) Method() string

func (FormMultipartWithFile) Path

type FormMultipartWithFiles

type FormMultipartWithFiles struct {
	FormData struct {
		Files []*mime_multipart.FileHeader `name:"files"`
	} `in:"body" mime:"multipart"`
}

func (FormMultipartWithFiles) Method

func (FormMultipartWithFiles) Method() string

func (FormMultipartWithFiles) Path

type FormURLEncoded

type FormURLEncoded struct {
	FormData struct {
		Data   Data     `name:"data"`
		Slice  []string `name:"slice"`
		String string   `name:"string"`
	} `in:"body" mime:"urlencoded"`
}

func (FormURLEncoded) Method

func (FormURLEncoded) Method() string

func (FormURLEncoded) Path

func (FormURLEncoded) Path() string

type GetByID

type GetByID struct {
	ID       string   `in:"path" name:"id" validate:"@string[6,]"`
	Label    []string `in:"query" name:"label,omitempty"`
	Name     string   `in:"query" name:"name,omitempty"`
	Protocol Protocol `in:"query" name:"protocol,omitempty"`
}

func (GetByID) Method

func (GetByID) Method() string

func (GetByID) Path

func (GetByID) Path() string

type GithubComGoCourierHttptransportHttpxResponse added in v1.15.1

type GithubComGoCourierHttptransportHttpxResponse = github_com_go_courier_httptransport_httpx.Response

type GithubComGoCourierHttptransportHttpxStatusFound

type GithubComGoCourierHttptransportHttpxStatusFound struct {
	GithubComGoCourierHttptransportHttpxResponse
}

type GithubComGoCourierStatuserrorErrorField

type GithubComGoCourierStatuserrorErrorField = github_com_go_courier_statuserror.ErrorField

type GithubComGoCourierStatuserrorErrorFields

type GithubComGoCourierStatuserrorErrorFields = github_com_go_courier_statuserror.ErrorFields

type GithubComGoCourierStatuserrorStatusErr

type GithubComGoCourierStatuserrorStatusErr = github_com_go_courier_statuserror.StatusErr

type HealthCheck

type HealthCheck struct {
}

func (HealthCheck) Method

func (HealthCheck) Method() string

func (HealthCheck) Path

func (HealthCheck) Path() string

type IpInfo added in v1.12.0

type IpInfo struct {
	Country     string `json:"country" xml:"country"`
	CountryCode string `json:"countryCode" xml:"countryCode"`
}

type Protocol

type Protocol = DemoProtocol

type Proxy added in v1.12.0

type Proxy struct {
}

func (*Proxy) Do added in v1.12.0

@StatusErr[ClientClosedRequest][499000001][request canceled] @StatusErr[RequestFailed][500000001][request failed] @StatusErr[RequestTransformFailed][400000001][transform request failed]

func (Proxy) Method added in v1.12.0

func (Proxy) Method() string

func (Proxy) Path added in v1.12.0

func (Proxy) Path() string

type ProxyV2 added in v1.16.0

type ProxyV2 struct {
}

func (*ProxyV2) Do added in v1.16.0

@StatusErr[ClientClosedRequest][499000001][request canceled] @StatusErr[RequestFailed][500000001][request failed] @StatusErr[RequestTransformFailed][400000001][transform request failed]

func (ProxyV2) Method added in v1.16.0

func (ProxyV2) Method() string

func (ProxyV2) Path added in v1.16.0

func (ProxyV2) Path() string

type Redirect

type Redirect struct {
}

func (Redirect) Method

func (Redirect) Method() string

func (Redirect) Path

func (Redirect) Path() string

type RedirectWhenError

type RedirectWhenError struct {
}

func (RedirectWhenError) Method

func (RedirectWhenError) Method() string

func (RedirectWhenError) Path

func (RedirectWhenError) Path() string

type RemoveByID

type RemoveByID struct {
	ID string `in:"path" name:"id" validate:"@string[6,]"`
}

func (RemoveByID) Method

func (RemoveByID) Method() string

func (RemoveByID) Path

func (RemoveByID) Path() string

type SubData added in v1.6.5

type SubData struct {
	Name string `json:"name"`
}

type UpdateByID

type UpdateByID struct {
	ID   string `in:"path" name:"id" validate:"@string[6,]"`
	Data Data   `in:"body"`
}

func (UpdateByID) Method

func (UpdateByID) Method() string

func (UpdateByID) Path

func (UpdateByID) Path() string

Jump to

Keyboard shortcuts

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