models

package
v0.7.3-0...-afa7ed7 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented   = errors.New("not implemented")
	ErrArrayNotAccepted = errors.New("arrays not accepted")
)

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, input *domain.Query) (query string, args []interface{}, err error)

nolint:funlen // builder

type ColumnParam

type ColumnParam struct {
	domain.QueryParam
}

func ColumnParamFromDomain

func ColumnParamFromDomain(param *domain.QueryParam) *ColumnParam

func (*ColumnParam) ToSql

func (p *ColumnParam) ToSql() (query string, args []interface{}, err error)

nolint:golint,stylecheck,gocritic

type Entry

type Entry struct {
	Time        time.Time `db:"time"`
	NSec        int64     `db:"nsec"`
	Namespace   string    `db:"namespace"`
	Source      string    `db:"source"`
	Host        string    `db:"host"`
	Level       string    `db:"level"`
	TraceID     string    `db:"trace_id"`
	Message     string    `db:"message"`
	RemoteIP    string    `db:"remote_ip"`
	Params      string    `db:"params"`
	BuildCommit string    `db:"build_commit"`
	ConfigHash  string    `db:"config_hash"`
}

func (*Entry) ToDomain

func (e *Entry) ToDomain() *domain.Entry

type JSONParam

type JSONParam struct {
	domain.QueryParam
	Type fieldType
}

func JSONParamFromDomain

func JSONParamFromDomain(param *domain.QueryParam, t fieldType) *JSONParam

func (*JSONParam) ToSql

func (p *JSONParam) ToSql() (query string, args []interface{}, err error)

nolint:golint,stylecheck,gocritic

type ParamInt

type ParamInt interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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