Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Package string
Errors []ErrorDefinition
}
Config holds the configuration for code generation.
type ErrorDefinition ¶
type ErrorDefinition struct {
Code uint64 `json:"code" yaml:"code"`
Key string `json:"key" yaml:"key"`
Message string `json:"message" yaml:"message"`
HTTP int `json:"http" yaml:"http"`
GRPC int `json:"grpc" yaml:"grpc"`
Desc string `json:"desc" yaml:"desc"`
}
ErrorDefinition represents a single error definition from the input file.
func ParseInput ¶
func ParseInput(reader io.Reader, filename string) ([]ErrorDefinition, error)
ParseInput reads and parses the input file (YAML or JSON) into error definitions.
Click to show internal directories.
Click to hide internal directories.