def

package
v0.0.28-beta Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 0 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldDef

type FieldDef struct {
	LocationType LocationType
	Name         string
	JsonTag      string
	KindName     string
}

func NewFieldDef

func NewFieldDef() *FieldDef

func (*FieldDef) WithJsonTag

func (field *FieldDef) WithJsonTag(tag string) *FieldDef

func (*FieldDef) WithKindName

func (field *FieldDef) WithKindName(kindName string) *FieldDef

func (*FieldDef) WithLocationType

func (field *FieldDef) WithLocationType(locationType LocationType) *FieldDef

func (*FieldDef) WithName

func (field *FieldDef) WithName(name string) *FieldDef

type HttpRequestDef

type HttpRequestDef struct {
	Method         string
	Path           string
	ContentType    string
	RequestFields  []*FieldDef
	ResponseFields []*FieldDef
	Response       interface{}
}

type HttpRequestDefBuilder

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

func NewHttpRequestDefBuilder

func NewHttpRequestDefBuilder() *HttpRequestDefBuilder

func (*HttpRequestDefBuilder) Build

func (builder *HttpRequestDefBuilder) Build() *HttpRequestDef

func (*HttpRequestDefBuilder) WithContentType

func (builder *HttpRequestDefBuilder) WithContentType(contentType string) *HttpRequestDefBuilder

func (*HttpRequestDefBuilder) WithMethod

func (builder *HttpRequestDefBuilder) WithMethod(method string) *HttpRequestDefBuilder

func (*HttpRequestDefBuilder) WithPath

func (builder *HttpRequestDefBuilder) WithPath(path string) *HttpRequestDefBuilder

func (*HttpRequestDefBuilder) WithRequestField

func (builder *HttpRequestDefBuilder) WithRequestField(field *FieldDef) *HttpRequestDefBuilder

func (*HttpRequestDefBuilder) WithResponse

func (builder *HttpRequestDefBuilder) WithResponse(response interface{}) *HttpRequestDefBuilder

func (*HttpRequestDefBuilder) WithResponseField

func (builder *HttpRequestDefBuilder) WithResponseField(field *FieldDef) *HttpRequestDefBuilder

type LocationType

type LocationType int32
const (
	Header LocationType = 1 << iota
	Path
	Query
	Body
)

Jump to

Keyboard shortcuts

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