Documentation ¶
Index ¶
- Variables
- type Addons
- type Common
- type CommonApi
- type CommonCall
- type Database
- type Dependency
- type Http
- type Import
- type Settings
- func (s *Settings) GetCommonCall(apiName CommonApi, call CommonCall) string
- func (s *Settings) GetValidationCustomRule(name string) (*ValidationRule, error)
- func (s *Settings) GetValidationRule(rule extensions.FieldValidatorRule) (*ValidationRule, error)
- func (s *Settings) IsSupportedCustomValidationRule(ruleName string) error
- func (s *Settings) Validate() error
- type Suffix
- type Templates
- type ValidationRule
- type Validations
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CommonCallToPtr = CommonCall{CommonApiConverters, "toPtr", "to_ptr"} CommonCallToValue = CommonCall{CommonApiConverters, "toValue", "to_value"} CommonCallProtoToTimePtr = CommonCall{CommonApiConverters, "protoTimestampToTimePtr", "proto_timestamp_to_go_time_ptr"} CommonCallTimeToProto = CommonCall{CommonApiConverters, "timeToProtoTimestamp", "go_time_to_proto_timestamp"} CommonCallMapToStruct = CommonCall{CommonApiConverters, "mapToGrpcStruct", "go_map_to_proto_struct"} CommonCallToProtoValue = CommonCall{CommonApiConverters, "convertToProtobufValue", "go_interface_to_proto_value"} )
Supported common APIs.
Functions ¶
This section is empty.
Types ¶
type Common ¶
type Common struct { Converters bool `toml:"converters" default:"true"` Api map[string]*Dependency `toml:"api"` }
type CommonCall ¶
type CommonCall struct {
// contains filtered or unexported fields
}
type Database ¶
type Database struct {
Kind string `toml:"kind" validate:"oneof=mongo" default:"mongo"`
}
type Dependency ¶
type Http ¶
type Http struct {
Framework string `toml:"framework" validate:"oneof=fasthttp" default:"fasthttp"`
}
type Import ¶
func (*Import) ModuleName ¶
type Settings ¶
type Settings struct { Debug bool `toml:"debug"` Suffix *Suffix `toml:"suffix" default:"{}"` Database *Database `toml:"database" default:"{}"` Http *Http `toml:"http" default:"{}"` Templates *Templates `toml:"templates" default:"{}"` Validations *Validations `toml:"validations"` Addons *Addons `toml:"addons"` }
func LoadSettings ¶
func (*Settings) GetCommonCall ¶
func (s *Settings) GetCommonCall(apiName CommonApi, call CommonCall) string
func (*Settings) GetValidationCustomRule ¶
func (s *Settings) GetValidationCustomRule(name string) (*ValidationRule, error)
func (*Settings) GetValidationRule ¶
func (s *Settings) GetValidationRule(rule extensions.FieldValidatorRule) (*ValidationRule, error)
func (*Settings) IsSupportedCustomValidationRule ¶
type ValidationRule ¶
type Validations ¶
type Validations struct { RulePackageImport *Import `toml:"rule_package_import"` Rule map[string]*ValidationRule `toml:"rule"` Custom map[string]*ValidationRule `toml:"custom"` }
Click to show internal directories.
Click to hide internal directories.