model

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const WWWForm = "www-form"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Init     Init     `yaml:"init"`
	Multi    []Multi  `yaml:"multi"`
	Package  string   `yaml:"package"`
	Protobuf Protobuf `yaml:"protobuf"`
}

type Encode added in v0.0.2

type Encode struct {
	Body string `yaml:"body"`
}

type Init

type Init struct {
	Handler  string   `yaml:"handler"`
	Args     InitReq  `yaml:"args"`
	RvStruct InitResp `yaml:"rvStruct"`
}

type InitReq

type InitReq struct {
	Field map[string]string `yaml:"field"`
}

type InitResp

type InitResp struct {
	Name  string            `yaml:"name"`
	Field map[string]string `yaml:"field"`
}

type KeyVal

type KeyVal[T, U any] struct {
	Key       T
	Val       U
	RawVal    any
	IsString  bool
	IsInt     bool
	IsFloat64 bool
}

func (*KeyVal[T, U]) SetIs added in v0.0.3

func (k *KeyVal[T, U]) SetIs() KeyVal[T, U]

type Multi added in v0.0.11

type Multi struct {
	Handler string `yaml:"handler"`

	Req  Req  `yaml:"req"`
	Resp Resp `yaml:"resp"`
	// contains filtered or unexported fields
}

func (*Multi) GetReqName added in v0.0.11

func (m *Multi) GetReqName() string

func (*Multi) GetRespName added in v0.0.11

func (m *Multi) GetRespName() string

func (*Multi) ModifyHandler added in v0.0.11

func (m *Multi) ModifyHandler()

type Protobuf added in v0.0.4

type Protobuf struct {
	Package   string `yaml:"package"`
	GoPackage string `yaml:"go_package"`
}

type Req

type Req struct {
	Encode          Encode            `yaml:"encode"`
	URL             string            `yaml:"url"`
	Curl            string            `yaml:"curl"`
	UsePtr          UsePtr            `yaml:"usePtr"`
	Template        Template          `yaml:"template"`
	Name            string            `yaml:"name"`
	NewType         map[string]string `yaml:"newType"`
	NewProtobufType map[string]string `yaml:"newProtobufType"`
	Body            any               `yaml:"body"`
	Header          []string          `yaml:"header"`
	Method          string            `yaml:"method"`
	UseDefault      UseDefault        `yaml:"useDefault"`
}

type Resp

type Resp struct {
	Name            string            `yaml:"name"`
	NewType         map[string]string `yaml:"newType"`
	NewProtobufType map[string]string `yaml:"newProtobufType"`
	Body            any               `yaml:"body"`
	Header          []string          `yaml:"header"`
}

type Template added in v0.0.8

type Template struct {
	URL bool `yaml:"url"`
}

type UseDefault

type UseDefault struct {
	Header []string `yaml:"header"`
	Body   []string `yaml:"body"`
}

type UsePtr added in v0.1.3

type UsePtr struct {
	Body []string `yaml:"body"`
}

Jump to

Keyboard shortcuts

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