Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCodeTypeFunc = defaultCodeTypeFunc
DefaultCodeTypeFunc default code mapping。
Functions ¶
Types ¶
type Code ¶
type Code struct { // Code in string Code string `yaml:"code"` // Type of code Type string `yaml:"type"` // Description code description Description string `yaml:"description"` // Service empty means full match Service string `yaml:"service"` // Method empty means full match Method string `yaml:"method"` }
Code structure.
type CodeConverter ¶
type CodeConverter struct {
// contains filtered or unexported fields
}
CodeConverter implements CodeMapper interface
func (*CodeConverter) Mapping ¶
func (cm *CodeConverter) Mapping(code, service, method string) *Code
Mapping redefine the return code
type CodeMapper ¶
CodeMapper mapping interface
type CodeTypeMappingDescription ¶
type CodeTypeMappingDescription struct { // CodeType ... CodeType string // Description ... Description string }
CodeTypeMappingDescription describe code_type_mapping information Deprecated
func NewCodeTypeMappingDescription ¶
func NewCodeTypeMappingDescription(codeType CodeType, desc string) *CodeTypeMappingDescription
NewCodeTypeMappingDescription ... Deprecated
func (*CodeTypeMappingDescription) String ¶
func (d *CodeTypeMappingDescription) String() string
String ... Deprecated
func (*CodeTypeMappingDescription) UnmarshalText ¶
func (d *CodeTypeMappingDescription) UnmarshalText(text []byte) error
UnmarshalText unmarshal yaml string to *CodeTypeMappingDescription。 Deprecated
type SetupOption ¶
type SetupOption func(setupOption *setupOption)
SetupOption Configuration method of codes, specify codes, configurator, etc.
func WithConfigurator ¶
func WithConfigurator(configurator remote.Configurator) SetupOption
WithConfigurator set configurator
func WithDefaultFunc ¶
func WithDefaultFunc(f CodeTypeFunc) SetupOption
WithDefaultFunc set the default return code redefinition method
Click to show internal directories.
Click to hide internal directories.