dto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CONFIG_SEARCH = map[string]interface{}{
	"e": "env",
	"k": "key",
	"m": "mod",
}

CONFIG_SEARCH : search condition of config list

Functions

This section is empty.

Types

type ConfigAddDto

type ConfigAddDto struct {
	Env  string `form:"env" valid:"Required"`
	Mod  string `form:"mod" valid:"Required"`
	Key  string `form:"key" valid:"Required"`
	Val  string `form:"val" valid:"Required"`
	Type string `form:"type"`
}

ConfigAddDto : struct property's name should identical with value of form ,or warning information may confuse people

func (*ConfigAddDto) Valid

func (cc *ConfigAddDto) Valid(v *validation.Validation)

Valid : extra validate

type ConfigDelDto

type ConfigDelDto struct {
	Id int `form:"id" valid:"Required;Min(1)"`
}

ConfigDelDto : delete dto

type ConfigEditDto

type ConfigEditDto struct {
	Id   int    `form:"id" valid:"Required;Min(1)"`
	Env  string `form:"env" valid:"Required"`
	Mod  string `form:"mod" valid:"Required"`
	Key  string `form:"key" valid:"Required"`
	Val  string `form:"val" valid:"Required"`
	Type string `form:"type"`
}

ConfigEditDto : edit dto

Jump to

Keyboard shortcuts

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