Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectorMetadata added in v1.0.0

type ConnectorMetadata struct {
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

ConnectorMetadata holds display-only metadata for connectors. Embed in connector structs — GetMetadata() is promoted automatically. Fields vary by model family (e.g. model_name, model_family, reasoning_efforts, reasoning_effort).

func (ConnectorMetadata) GetMetadata added in v1.0.0

func (m ConnectorMetadata) GetMetadata() map[string]interface{}

GetMetadata returns the display-only metadata map, or nil if not set.

type MetaInfo added in v1.0.0

type MetaInfo struct {
	Label       string    `json:"label,omitempty"`       // The label of the DSL
	Description string    `json:"description,omitempty"` // The description of the DSL ( markdown or plain text )
	Tags        []string  `json:"tags,omitempty"`        // The tags of the DSL
	Readonly    bool      `json:"readonly,omitempty"`    // The DSL is readonly
	Builtin     bool      `json:"builtin,omitempty"`     // The DSL is builtin
	Sort        int       `json:"sort,omitempty"`        // The sort of the DSL
	Mtime       time.Time `json:"mtime,omitempty"`       // The mtime of the DSL
	Ctime       time.Time `json:"ctime,omitempty"`       // The ctime of the DSL
}

MetaInfo The meta info of the DSL (Each DSL has its own meta info)

type QueryOrder

type QueryOrder struct {
	Rel    string `json:"rel,omitempty"` // Relation Name
	Column string `json:"column"`
	Option string `json:"option,omitempty"` // desc, asc
}

QueryOrder Order 查询排序

type QueryParam

type QueryParam struct {
	Model    string          `json:"model,omitempty"`
	Table    string          `json:"table,omitempty"`
	Alias    string          `json:"alias,omitempty"`
	Export   string          `json:"export,omitempty"` // 导出前缀
	Select   []interface{}   `json:"select,omitempty"` // string | dbal.Raw
	Wheres   []QueryWhere    `json:"wheres,omitempty"`
	Orders   []QueryOrder    `json:"orders,omitempty"`
	Limit    int             `json:"limit,omitempty"`
	Page     int             `json:"page,omitempty"`
	PageSize int             `json:"pagesize,omitempty"`
	Withs    map[string]With `json:"withs,omitempty"`
}

QueryParam 数据查询器参数

func AnyToQueryParam

func AnyToQueryParam(v interface{}) (QueryParam, bool)

AnyToQueryParam interface 转换为 QueryParams

func URLToQueryParam

func URLToQueryParam(values url.Values) QueryParam

URLToQueryParam url.Values 转换为 QueryParams

type QueryWhere

type QueryWhere struct {
	Rel    string       `json:"rel,omitempty"` // Relation Name
	Column interface{}  `json:"column,omitempty"`
	Value  interface{}  `json:"value,omitempty"`
	Method string       `json:"method,omitempty"` // where,orwhere, wherein, orwherein...
	OP     string       `json:"op,omitempty"`     // 操作 eq/gt/lt/ge/le/like...
	Wheres []QueryWhere `json:"wheres,omitempty"` // 分组查询
}

QueryWhere Where 查询条件

type UploadFile

type UploadFile struct {
	UID      string               `json:"uid,omitempty"`   // Content-Uid The unique identifier of the file ( for chunk upload )
	Range    string               `json:"range,omitempty"` // Content-Range bytes start-end/total (for chunk upload)
	Sync     bool                 `json:"sync,omitempty"`  // Content-Sync sync upload or not. the default is false
	Name     string               `json:"name"`
	TempFile string               `json:"tempFile"`
	Size     int64                `json:"size"`
	Header   textproto.MIMEHeader `json:"header"`
	Error    string               `json:"error"`
}

UploadFile upload file

func (UploadFile) ChunkFileName added in v1.0.0

func (upload UploadFile) ChunkFileName() string

ChunkFileName get chunk file name

func (UploadFile) Hash added in v1.0.0

func (upload UploadFile) Hash() string

Hash hash

func (UploadFile) IsChunk added in v1.0.0

func (upload UploadFile) IsChunk() bool

IsChunk is chunk upload or not

func (UploadFile) IsError added in v1.0.0

func (upload UploadFile) IsError() bool

IsError is error or not

func (UploadFile) TotalSize added in v1.0.0

func (upload UploadFile) TotalSize() int64

TotalSize total size

type UploadProgress added in v1.0.0

type UploadProgress struct {
	Total     int64 `json:"total"`
	Uploaded  int64 `json:"uploaded"`
	Completed bool  `json:"completed"`
}

UploadProgress upload progress

type With

type With struct {
	Name  string     `json:"name"`
	Query QueryParam `json:"query,omitempty"`
}

With relations 关联查询

Jump to

Keyboard shortcuts

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