datamodels

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MatchAll = "matchAll"
	MatchAny = "matchAny"
)
View Source
const (
	SortOrderAsc  = "Asc"
	SortOrderDesc = "Desc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkStatus

type ChunkStatus struct {
	Path       string `json:"path"`
	ChunkCount int    `json:"chunkCount"`
}

type Column

type Column struct {
	Name   string     `json:"name"`
	Type   ColumnType `json:"type"`
	Length int        `json:"length"`
}

type ColumnType

type ColumnType string
const (
	Id               ColumnType = "Id"               // primary key and auto increase
	StringPrimaryKey ColumnType = "StringPrimaryKey" // primary key but not auto increase
	Int              ColumnType = "Int"
	Boolean          ColumnType = "Boolean"
	Datetime         ColumnType = "Datetime"
	CreatedTime      ColumnType = "CreatedTime" // default as current datetime
	UpdatedTime      ColumnType = "UpdatedTime" // default/onupdate set as current datetime
	Text             ColumnType = "Text"        // slow performance compare to string
	String           ColumnType = "String"      // has length limit 255
	Float            ColumnType = "Float"
)

type Constraint

type Constraint struct {
	Match  string    `json:"match"`
	Values []*string `json:"values"`
}

type Filter

type Filter struct {
	FieldName   string       `json:"fieldName"`
	MatchType   string       `json:"matchType"`
	Constraints []Constraint `json:"constraints"`
}

type Pagination

type Pagination struct {
	Offset *string `json:"offset"`
	Limit  *string `json:"limit"`
}

type ParseResult

type ParseResult struct {
	Filters    []Filter
	Sorts      []Sort
	Pagination Pagination
}

func ParseQuery

func ParseQuery(args StrArgs) ParseResult

type Record

type Record map[string]interface{}

type Sort

type Sort struct {
	Field string `json:"field"`
	Order string `json:"order"`
}

type StrArgs

type StrArgs map[string][]string

type UploadSession

type UploadSession struct {
	UserId   string `json:"userId"`
	FileName string `json:"fileName"`
	FileSize int64  `json:"fileSize"`
	Path     string `json:"path"`
}

type ValidPagination

type ValidPagination struct {
	Offset int `json:"offset"`
	Limit  int `json:"limit"`
}

Jump to

Keyboard shortcuts

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