autodocs

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_LEVEL = 5
)

Variables

View Source
var (
	PatternTitle, _          = regexp.Compile(`(title\:(.+?);)|(title\:(.+?)$)`)
	PatternReferenceField, _ = regexp.Compile(`(referenceField\:(.+?);)|(referenceField\:(.+?)$)`)
	PatternReferenceTable, _ = regexp.Compile(`(referenceTable\:(.+?);)|(referenceTable\:(.+?)$)`)
	PatternReferencePk, _    = regexp.Compile(`(referencePk\:(.+?);)|(referencePk\:(.+?)$)`)
	PatternReferenceProxy, _ = regexp.Compile(`(referenceProxy\:(.+?);)|(referenceProxy\:(.+?)$)`)
)

Functions

This section is empty.

Types

type FilterField

type FilterField struct {
	ParamName      string      `json:"paramName"`
	TypeQueryParam interface{} `json:"typeQueryParam"`
	Enum           interface{} `json:"enum"`
	Directory      string      `json:"directory"`
}

type ReferenceData

type ReferenceData struct {
	PresentationField string `json:"presentationField"`
}

type ReferenceTable

type ReferenceTable struct {
	TableName string `json:"tableName"`
	PkField   string `json:"pkField"`
}

type SerializerField

type SerializerField struct {
	NameField      string          `json:"nameField"`
	Title          string          `json:"title"`
	Type           string          `json:"type"`
	Signatura      interface{}     `json:"signatura"`
	Required       bool            `json:"required"`
	ReadOnly       bool            `json:"readOnly"`
	WriteOnly      bool            `json:"writeOnly"`
	ReferenceData  *ReferenceData  `json:"referenceData"`
	ReferenceTable *ReferenceTable `json:"referenceTable"`
	ProxyField     *ReferenceData  `json:"proxyField"`
}

func GetSerializerFields

func GetSerializerFields(serializer interface{}, level int) []SerializerField

type ViewData

type ViewData struct {
	ViewType          views.ViewType        `json:"viewType"`
	MethodsAllow      []views.ViewSetMethod `json:"methodsAllow"`
	TableName         string                `json:"tableName"`
	FilterFields      []FilterField         `json:"filterFields"`
	SortAllowFields   []string              `json:"sortAllowFields"`
	SerializersFields []SerializerField     `json:"serializersFields"`
	Description       string                `json:"description"`
	PermissionModule  string                `json:"permissionModule"`
}

func GenerateJSON

func GenerateJSON(viewList []views.ViewInterface) []ViewData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL