Documentation
¶
Index ¶
- Variables
- func CheckMethodHasSwitch(s GenRestSwitch) bool
- func DepthGen(src, dest string, fn func(src, dest string))
- func Dump(i interface{}) string
- func FuncImportUnique(fs []gen_apiV2.Func) string
- func GenApi(src, dest string)
- func GenForMat(s string, data interface{}) string
- func GenTs(src, dest, prefix string)
- func GetInclude(m map[string]map[string]interface{}, node string, l []string, res *[][]string)
- func GetModuleName() string
- func IncludesTo(include []string, symbol string) string
- func LoadV2(schemaPath string, dest string)
- func MergeImports(fs []gen_apiV2.Func) string
- func OpsString(ops []Op) []string
- func PaseGraphInclude(g gen.Graph) map[string][]string
- func PaseRelType(e *gen.Edge) struct{ ... }
- func PaseRestEdgeInclude(m map[string]interface{}) bool
- func PaseRestFieldOperability(m map[string]interface{}, o string) string
- func PaseRestFieldQueryOp(m map[string]interface{}) []string
- func SliceContains(l []string, s string) bool
- func SliceHasKey(l []string, k string) bool
- func Snake(s string) string
- type EdgeMethod
- type EdgeMethodOp
- type EnumData
- type FieldOperability
- type FieldQueryable
- type GPackingV2
- type GenRestSwitch
- type GoMod
- type Module
- type NodeMethod
- type NodeMethodOp
- type Op
- type Order
- type OrderOp
- type Paging
- type RestEdgeOp
- type RestFieldOp
- type RestNodeOp
- type TempString
Constants ¶
This section is empty.
Variables ¶
View Source
var FM = template.FuncMap{ "myOps": MyFieldOps, "opsString": OpsString, "PaseRestNodeOrderOp": PaseRestNodeOrderOp, "PaseRestFieldQueryOp": PaseRestFieldQueryOp, "PaseRestFieldOperability": PaseRestFieldOperability, "PaseRestNodePaging": PaseRestNodePaging, "PaseRestNodeMethod": PaseRestNodeMethod, "CheckMethodHasSwitch": CheckMethodHasSwitch, "PaseRestEdgeMethod": PaseRestEdgeMethod, "PaseFieldIsEnum": PaseFieldIsEnum, "PaseRestEdgeInclude": PaseRestEdgeInclude, "PaseGraphInclude": PaseGraphInclude, "IncludesTo": IncludesTo, "PaseRelType": PaseRelType, "SliceHasKey": SliceHasKey, "PaseFieldsOrderOp": PaseFieldsOrderOp, "Join": strings.Join, "ForMat": GenForMat, "FuncImportUnique": FuncImportUnique, "MergeImports": MergeImports, "Dump": Dump, "PathJoin": path.Join, }
View Source
var RestEdgeType = "RestEdgeOp"
View Source
var RestFieldType = "RestFieldOp"
View Source
var RestNodeType = "RestNodeOp"
Functions ¶
func CheckMethodHasSwitch ¶
func CheckMethodHasSwitch(s GenRestSwitch) bool
func FuncImportUnique ¶
func GetInclude ¶
func GetModuleName ¶
func GetModuleName() string
func IncludesTo ¶
func MergeImports ¶
func PaseRestEdgeInclude ¶
func PaseRestFieldQueryOp ¶
func SliceContains ¶
func SliceHasKey ¶
Types ¶
type EdgeMethod ¶
type EdgeMethod struct { Get EdgeMethodOp Create EdgeMethodOp Delete EdgeMethodOp }
func PaseRestEdgeMethod ¶
func PaseRestEdgeMethod(m map[string]interface{}) EdgeMethod
type EdgeMethodOp ¶
type EdgeMethodOp struct { Has GenRestSwitch `json:"has"` RouterTag string `json:"router_tag"` Comments []string `json:"comments"` }
type EnumData ¶
func PaseFieldIsEnum ¶
type FieldOperability ¶
type FieldOperability struct { Selete GenRestSwitch Create GenRestSwitch Update GenRestSwitch }
type FieldQueryable ¶
type FieldQueryable struct { EQ GenRestSwitch `json:"EQ"` NEQ GenRestSwitch `json:"NEQ"` GT GenRestSwitch `json:"GT"` GTE GenRestSwitch `json:"GTE"` LT GenRestSwitch `json:"LT"` LTE GenRestSwitch `json:"LTE"` IsNil GenRestSwitch `json:"IsNil"` NotNil GenRestSwitch `json:"NotNil"` EqualFold GenRestSwitch `json:"EqualFold"` Contains GenRestSwitch `json:"Contains"` ContainsFold GenRestSwitch `json:"ContainsFold"` HasPrefix GenRestSwitch `json:"HasPrefix"` HasSuffix GenRestSwitch `json:"HasSuffix"` In GenRestSwitch `json:"In"` NotIn GenRestSwitch `json:"NotIn"` Order GenRestSwitch `json:"Order"` }
type GenRestSwitch ¶
type GenRestSwitch int
const GenRestDefault GenRestSwitch = 0
const GenRestFalse GenRestSwitch = 2
const GenRestTrue GenRestSwitch = 1
type NodeMethod ¶
type NodeMethod struct { GetOne NodeMethodOp GetList NodeMethodOp CreateOne NodeMethodOp CreateList NodeMethodOp UpdateOne NodeMethodOp UpdateList NodeMethodOp DeleteOne NodeMethodOp DeleteList NodeMethodOp }
func PaseRestNodeMethod ¶
func PaseRestNodeMethod(m map[string]interface{}) NodeMethod
type NodeMethodOp ¶
type NodeMethodOp struct { Has GenRestSwitch `json:"has"` RouterTag string `json:"router_tag"` Comments []string `json:"comments"` }
type Op ¶
type Op int
const ( EQ Op = iota // = NEQ // <> GT // > GTE // >= LT // < LTE // <= IsNil // IS NULL / has NotNil // IS NOT NULL / hasNot In // within NotIn // without EqualFold // equals case-insensitive Contains // containing ContainsFold // containing case-insensitive HasPrefix // startingWith HasSuffix // endingWith )
func MyFieldOps ¶
type Order ¶
type Order struct { DefaultAcsOrder []string `json:"default_acs_order"` DefaultDescOrder []string `json:"default_desc_order"` OpenOptionalOrder bool `json:"open_optional_order"` OptionalOrder []string `json:"optional_order"` }
func PaseRestNodeOrderOp ¶
type OrderOp ¶
func PaseFieldsOrderOp ¶
type Paging ¶
type Paging struct { Open bool `json:"open"` Must bool `json:"must"` MaxLimit float64 `json:"max_limit"` }
func PaseRestNodePaging ¶
type RestEdgeOp ¶
type RestEdgeOp struct { Method EdgeMethod Include GenRestSwitch }
type RestFieldOp ¶
type RestFieldOp struct { FieldQueryable FieldQueryable `json:"field_queryable"` FieldOperability FieldOperability `json:"field_operability"` }
func (RestFieldOp) Name ¶
func (r RestFieldOp) Name() string
type RestNodeOp ¶
type RestNodeOp struct { Paging Paging `json:"paging"` Order Order `json:"order"` Method NodeMethod `json:"method"` }
func (RestNodeOp) Name ¶
func (r RestNodeOp) Name() string
type TempString ¶
type TempString string
func (TempString) Format ¶
func (s TempString) Format(data interface{}) (out string, err error)
Click to show internal directories.
Click to hide internal directories.