Documentation
¶
Index ¶
- func AddUnique(arr []string, values ...string) []string
- type Enum
- type EnumLiteral
- type ExtField
- type Field
- func (f *Field) AddMassStrValue(value string, keys []string)
- func (f *Field) AddStrValue(key, value string)
- func (f Field) AsParamDefinition(currentPackageName string) string
- func (f Field) AsParamDefinitionCutPointer(currentPackageName string) string
- func (f *Field) HasValue(key string) bool
- func (f *Field) HasValueEq(key, find string) bool
- func (f Field) TypeNameAsDefinition() string
- func (f Field) TypeNameWithPackageNameIfNotSame(packageName string) string
- type Interface
- type LinkedStructs
- func (c *LinkedStructs) AddMassValue(value interface{}, keys []string)
- func (c *LinkedStructs) AddValue(key string, value interface{})
- func (this *LinkedStructs) Append(s *StructInfo)
- func (this *LinkedStructs) FindStructByModel(name string) *StructInfo
- func (this *LinkedStructs) FindStructByTable(name string) *StructInfo
- func (this *LinkedStructs) GetItems() []*StructInfo
- func (c *LinkedStructs) GetValue(key string) string
- func (this *LinkedStructs) HaveValue(name string) bool
- type Operation
- type ParsedSources
- type ParsedSourcesLink
- type Struct
- func (s Struct) FindFieldByName(name string) *Field
- func (s Struct) FindOperationByName(name string) *Operation
- func (s Struct) HaveData() bool
- func (s Struct) HaveMarker(name string) bool
- func (s *Struct) HaveMarkerEq(name string, value string) bool
- func (s Struct) IsFieldByNameExists(name string) bool
- func (s Struct) IsOperationByNameExists(name string) bool
- func (s *Struct) SetMarker(name string, value string)
- type StructInfo
- type Typedef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Enum ¶
type Enum struct {
Imports []string `json:"imports"`
PackageName string `json:"packageName"`
Filename string `json:"filename"`
DocLines []string `json:"docLines,omitempty"`
Name string `json:"name,omitempty"`
EnumLiterals []EnumLiteral `json:"enumLiterals,omitempty"`
CommentLines []string `json:"commentLines,omitempty"`
OnlyComments []string `json:"onlyComments,omitempty"`
}
@JsonStruct()
func (Enum) FindEnumLiteralByName ¶
func (e Enum) FindEnumLiteralByName(name string) *EnumLiteral
func (Enum) FindEnumLiteralByValue ¶
func (e Enum) FindEnumLiteralByValue(value string) *EnumLiteral
func (Enum) IsEnumLiteralByValueExists ¶
type EnumLiteral ¶
@JsonStruct()
type ExtField ¶
type ExtField struct {
FullInfo *Field
CommentLines []string
CommentRightSide []string
Annotations []string
}
Pochodzi z daogen (Jako Field) - ale warto zaimplementować globalnie
type Field ¶
type Field struct {
PackageName string `json:"packageName,omitempty"`
DocLines []string `json:"docLines,omitempty"`
Name string `json:"name,omitempty"`
TypeName string `json:"typeName,omitempty"`
IsSlice bool `json:"isSlice,omitempty"`
IsInterface bool `json:"isSlice,omitempty"`
IsPointer bool `json:"isPointer,omitempty"`
Tag string `json:"tag,omitempty"`
CommentLines []string `json:"commentLines,omitempty"`
OnlyComments []string `json:"onlyComments,omitempty"`
// wlasne dane uzywane przez dany moduł
StrValues map[string]string
}
@JsonStruct()
func (*Field) AddMassStrValue ¶
AddStrValue("true", []string{"klucz1","klucz2","klucz3"...})
func (*Field) AddStrValue ¶
func (Field) AsParamDefinition ¶
jest currentPackageName != nazwy pakietu z ktorego pochodzi pole to: - user []*package.User inaczej: - user []*User
func (Field) AsParamDefinitionCutPointer ¶
func (*Field) HasValueEq ¶
func (Field) TypeNameAsDefinition ¶
func (Field) TypeNameWithPackageNameIfNotSame ¶
type Interface ¶
type Interface struct {
Imports []string `json:"imports"`
PackageName string `json:"packageName"`
Filename string `json:"filename"`
DocLines []string `json:"docLines,omitempty"`
Name string `json:"name"`
Methods []Operation `json:"methods,omitempty"`
CommentLines []string `json:"commentLines,omitempty"`
OnlyComments []string `json:"onlyComments,omitempty"`
}
@JsonStruct()
func (Interface) FindMethodByName ¶
func (Interface) IsMethodByNameExists ¶
type LinkedStructs ¶
type LinkedStructs struct {
// do komunikacji między modułami i twojego wew. użytku
Values map[string]interface{}
// contains filtered or unexported fields
}
Moze sluzyc do powiazanie struktur e sobą
func NewLinkedStructs ¶
func NewLinkedStructs() *LinkedStructs
func (*LinkedStructs) AddMassValue ¶
func (c *LinkedStructs) AddMassValue(value interface{}, keys []string)
AddStrValue("true", []string{"klucz1","klucz2","klucz3"...})
func (*LinkedStructs) AddValue ¶
func (c *LinkedStructs) AddValue(key string, value interface{})
func (*LinkedStructs) Append ¶
func (this *LinkedStructs) Append(s *StructInfo)
func (*LinkedStructs) FindStructByModel ¶
func (this *LinkedStructs) FindStructByModel(name string) *StructInfo
func (*LinkedStructs) FindStructByTable ¶
func (this *LinkedStructs) FindStructByTable(name string) *StructInfo
func (*LinkedStructs) GetItems ¶
func (this *LinkedStructs) GetItems() []*StructInfo
func (*LinkedStructs) GetValue ¶
func (c *LinkedStructs) GetValue(key string) string
func (*LinkedStructs) HaveValue ¶
func (this *LinkedStructs) HaveValue(name string) bool
type Operation ¶
type Operation struct {
Imports []string `json:"imports"`
PackageName string `json:"packageName,omitempty"`
Filename string `json:"filename,omitempty"`
DocLines []string `json:"docLines,omitempty"`
RelatedStruct *Field `json:"relatedStruct,omitempty"` // optional
StructDefinition *Struct
Name string `json:"name"`
InputArgs []Field `json:"inputArgs,omitempty"`
OutputArgs []Field `json:"outputArgs,omitempty"`
CommentLines []string `json:"commentLines,omitempty"`
OnlyComments []string `json:"onlyComments,omitempty"`
}
@JsonStruct()
func (Operation) FindInputFieldByName ¶
func (Operation) FindOutputFieldByName ¶
func (Operation) HaveParams ¶
func (Operation) HaveReturn ¶
type ParsedSources ¶
type ParsedSources struct {
Structs []Struct `json:"structs,omitempty"`
Operations []Operation `json:"operations,omitempty"`
Interfaces []Interface `json:"interfaces,omitempty"`
Typedefs []Typedef `json:"typedefs,omitempty"`
Enums []Enum `json:"enums,omitempty"`
Imports []string `json:"imports"`
FileName map[string]*ParsedSourcesLink
}
@JsonStruct()
func (ParsedSources) FileNames ¶
func (p ParsedSources) FileNames() []string
Nazwy plików, w których znaleźliśmy definicje
type ParsedSourcesLink ¶
type ParsedSourcesLink struct {
Structs []*Struct `json:"structs,omitempty"`
Operations []*Operation `json:"operations,omitempty"`
Interfaces []*Interface `json:"interfaces,omitempty"`
Typedefs []*Typedef `json:"typedefs,omitempty"`
Enums []*Enum `json:"enums,omitempty"`
Imports []*string `json:"imports"`
}
type Struct ¶
type Struct struct {
// możesz sobie coś dopisać (markery to jakieś własne flagi)
Markers map[string]string
// w data możesz zbindować co chcesz
Data interface{}
PackageName string `json:"packageName"`
Imports []string `json:"imports"`
Filename string `json:"filename"`
DocLines []string `json:"docLines,omitempty"`
Name string `json:"name"`
Fields []Field `json:"fields,omitempty"`
Operations []*Operation `json:"operations,omitempty"`
CommentLines []string `json:"commentLines,omitempty"`
OnlyComments []string `json:"onlyComments,omitempty"`
}
@JsonStruct()
func (Struct) FindFieldByName ¶
func (Struct) FindOperationByName ¶
func (Struct) HaveMarker ¶
func (Struct) IsFieldByNameExists ¶
func (Struct) IsOperationByNameExists ¶
type StructInfo ¶
type Typedef ¶
type Typedef struct {
Imports []string `json:"imports"`
PackageName string `json:"packageName"`
Filename string `json:"filename"`
DocLines []string `json:"docLines,omitempty"`
Name string `json:"name"`
Type string `json:"type,omitempty"`
OnlyComments []string `json:"onlyComments,omitempty"`
}
@JsonStruct()
Click to show internal directories.
Click to hide internal directories.