info

package
v0.0.0-...-9d7b7cc Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct {
	Key  string
	Name string
}

func (*Code) ErrorNum

func (c *Code) ErrorNum() int

func (*Code) GenCode

func (c *Code) GenCode(key string, name string) Code

func (*Code) NameWithCode

func (c *Code) NameWithCode() string

type Error

type Error struct {
	Name string            `yaml:"name"`
	Msg  string            `yaml:"message"`
	Key  *string           `yaml:"key"`
	Desc *string           `yaml:"description"`
	Url  *string           `yaml:"url"`
	Meta map[string]string `yaml:"metadata"`
}

type ErrorWithCode

type ErrorWithCode struct {
	Code  Code
	Error Error
}

func ParseErrors

func ParseErrors(ecs []*ErrorWithCode, code Code, infos []Info) []*ErrorWithCode

type Info

type Info struct {
	Name   string   `yaml:"name"`
	Groups *[]Info  `yaml:"groups"`
	Errors *[]Error `yaml:"errors"`
}

Jump to

Keyboard shortcuts

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