idl

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 8 Imported by: 3

Documentation

Overview

Package idl ...

Package idl ...

Index

Constants

View Source
const JSON = "json"

JSON ...

Variables

This section is empty.

Functions

func Bind

func Bind(r *http.Request, req Request) error

Bind ...

func BindAndValidate

func BindAndValidate(r *http.Request, req Request) error

BindAndValidate ...

Types

type APIErr

type APIErr interface {
	error
	Code() int
}

APIErr ...

type Field

type Field struct {
	Required bool
	JSON     string
	Default  interface{}
	MinLen   int
	MaxLen   int
	MaxVal   interface{}
	MinVal   interface{}
	Codec    string
}

Field ...

type IController

type IController interface {
	GetRequestIDL() interface{}
	Do(context.Context, interface{}) (interface{}, APIErr)
}

IController ...

type IStruct

type IStruct interface {
	GetValidateDef() ValidateDef
}

IStruct ...

type Request

type Request interface {
	GetValidateDef() ValidateDef
}

Request ...

type Response

type Response interface {
	Encode() ([]byte, error)
}

Response ...

type ValidateDef

type ValidateDef map[interface{}]*Field

ValidateDef ...

Jump to

Keyboard shortcuts

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