models

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Col

type Col struct {
	ColName string
	*Field
}

type Field

type Field struct {
	Name   string
	GoType string
}

func (*Field) AsParamName

func (f *Field) AsParamName() string

type GenerateFileDesc

type GenerateFileDesc struct {
	Name        string
	Content     string
	CheckExists bool
}

type Import

type Import struct {
	Alias      string
	ImportPath string
}

func (*Import) GetPath

func (cip *Import) GetPath() string

func (*Import) Init

func (cip *Import) Init(importPath string) *Import

func (*Import) IsEmpty

func (cip *Import) IsEmpty() bool

func (*Import) IsSame

func (cip *Import) IsSame(i *Import) bool

type Key

type Key struct {
	// this represents from field and type
	KeyName string
	KeyType generated.DBKeyType
	Fields  []*Field
}

func (*Key) GetFieldNameCombine

func (k *Key) GetFieldNameCombine() string

type Kv

type Kv struct {
	Key   string
	Value string
}

type SwaggerApis added in v0.0.5

type SwaggerApis struct {
	Tags       []*SwaggerTag `json:"tags"`
	BasePath   string        `json:"basePath"`
	Containers map[string]map[string]*SwaggerRoute
}

func (*SwaggerApis) AddRoute added in v0.0.5

func (sa *SwaggerApis) AddRoute(path, method string, route *SwaggerRoute)

func (*SwaggerApis) AsDoc added in v0.0.5

func (sa *SwaggerApis) AsDoc(paramsMap map[string]*SwaggerMessage) map[string]interface{}

type SwaggerAuth added in v0.0.5

type SwaggerAuth struct {
	Name    string   `json:"name"`
	Scope   []string `json:"scope"`
	Schemes []string `json:"schemes"`
}

type SwaggerDoc added in v0.0.5

type SwaggerDoc struct {
	Tags []*SwaggerTag           `json:"tags"`
	Auth []*SwaggerAuth          `json:"auth"`
	Host string                  `json:"host"`
	Apis map[string]*SwaggerApis `json:"apis"`
	Loc  string                  `json:"loc"`
}

func (*SwaggerDoc) AddService added in v0.0.5

func (sd *SwaggerDoc) AddService(name string, service *SwaggerApis)

func (*SwaggerDoc) AsDoc added in v0.0.5

func (sd *SwaggerDoc) AsDoc(paramsMap map[string]*SwaggerMessage) map[string]interface{}

type SwaggerMessage added in v0.0.5

type SwaggerMessage struct {
	Name        string                 `json:"name"`
	Type        string                 `json:"type"`
	Required    []string               `json:"required"`
	Properties  []*SwaggerMessageField `json:"properties"`
	Identify    string                 `json:"identify"`
	Description string                 `json:"description"`
}

func (*SwaggerMessage) AsDef added in v0.0.5

func (swaggerMessage *SwaggerMessage) AsDef() interface{}

func (*SwaggerMessage) AsRequest added in v0.0.5

func (swaggerMessage *SwaggerMessage) AsRequest(location string) interface{}

func (*SwaggerMessage) AsResponse added in v0.0.5

func (swaggerMessage *SwaggerMessage) AsResponse() interface{}

type SwaggerMessageField added in v0.0.5

type SwaggerMessageField struct {
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Required    bool            `json:"required"`
	Type        string          `json:"-"`
	IsSlice     bool            `json:"-"`
	Enum        []string        `json:"enum,omitempty"`
	Example     string          `json:"example,omitempty"`
	Format      string          `json:"format,omitempty"`
	Identify    string          `json:"-"`
	Refer       *SwaggerMessage `json:"ref,omitempty"`
}

func (*SwaggerMessageField) AsDefinition added in v0.0.5

func (swaggerField *SwaggerMessageField) AsDefinition() map[string]interface{}

func (*SwaggerMessageField) AsRequest added in v0.0.5

func (swaggerField *SwaggerMessageField) AsRequest(location string) interface{}

type SwaggerMessageRef added in v0.0.5

type SwaggerMessageRef struct {
	FullName string `json:"full_name"`
	Location string `json:"location"`
}

type SwaggerRoute added in v0.0.5

type SwaggerRoute struct {
	Description string   `json:"description"`
	OperationId string   `json:"operationId"`
	Consumes    []string `json:"consumes"`
	Produces    []string `json:"produces"`

	Requests  *SwaggerMessageRef `json:"requests"`
	Responses *SwaggerMessageRef `json:"responses"`
}

func (*SwaggerRoute) AsDoc added in v0.0.5

func (sr *SwaggerRoute) AsDoc(paramsMap map[string]*SwaggerMessage) map[string]interface{}

type SwaggerTag added in v0.0.5

type SwaggerTag struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Tag

type Tag struct {
	KV     *Kv
	Mapper func(s string) string
}

func (*Tag) GetTagValue

func (t *Tag) GetTagValue(by string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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