model

package
v0.0.0-...-044e210 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	JSON CfgType = "json"
	YAML         = "yaml"
	INVALID
)

Variables

View Source
var (
	InvalidError = fmt.Errorf("非法的类型")
)

Functions

This section is empty.

Types

type CfgType

type CfgType string

func ConvertType

func ConvertType(data string) (CfgType, error)

type Config

type Config struct {
	Id      primitive.ObjectID `bson:"_id"`
	Data    string             `bson:"data"`    //数据
	Key     string             `bson:"key"`     //key
	Version int                `bson:"version"` //版本
	Type    CfgType            `bson:"type"`
}

func NewConfig

func NewConfig(data string, key string, cfgType CfgType, version int) *Config

Jump to

Keyboard shortcuts

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