schema

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MPL-2.0, MIT Imports: 17 Imported by: 189

README

CloudQuery Type System

This directory is heavily based on jackc/pgtype and modified per CQ needs and thus fall under the original MIT license and copyright.

Documentation

Overview

Package schema defines types supported by tables in source plugins

Index

Constants

This section is empty.

Variables

View Source
var CqIDColumn = Column{
	Name:        "_cq_id",
	Type:        TypeUUID,
	Description: "Internal CQ ID of the row",
	Resolver:    cqUUIDResolver(),
}

These columns are managed and populated by the source plugins

View Source
var CqParentIDColumn = Column{
	Name:          "_cq_parent_id",
	Type:          TypeUUID,
	Description:   "Internal CQ ID of the parent row",
	Resolver:      parentCqUUIDResolver(),
	IgnoreInTests: true,
}
View Source
var CqSourceNameColumn = Column{
	Name:        "_cq_source_name",
	Type:        TypeString,
	Description: "Internal CQ row that references the source plugin name data was retrieved",
}
View Source
var CqSyncTimeColumn = Column{
	Name:        "_cq_sync_time",
	Type:        TypeTimestamp,
	Description: "Internal CQ row of when sync was started (this will be the same for all rows in a single fetch)",
}

These columns are managed and populated by the destination plugin.

Functions

func TransformWithTransformer added in v0.13.23

func TransformWithTransformer(transformer CQTypeTransformer, values CQTypes) []interface{}

func ValidateTable

func ValidateTable(t *Table) error

Types

type ArrayDimension added in v0.13.23

type ArrayDimension struct {
	Length     int32
	LowerBound int32
}

type Bool added in v0.13.23

type Bool struct {
	Bool   bool
	Status Status
}

func (*Bool) Equal added in v0.13.23

func (dst *Bool) Equal(src CQType) bool

func (Bool) Get added in v0.13.23

func (dst Bool) Get() interface{}

func (*Bool) Set added in v0.13.23

func (dst *Bool) Set(src interface{}) error

func (*Bool) String added in v0.13.23

func (dst *Bool) String() string

func (*Bool) Type added in v0.13.23

func (*Bool) Type() ValueType

type BoolTransformer added in v0.13.23

type BoolTransformer interface {
	TransformBool(*Bool) interface{}
}

type Bytea added in v0.13.23

type Bytea struct {
	Bytes  []byte
	Status Status
}

func (*Bytea) Equal added in v0.13.23

func (dst *Bytea) Equal(src CQType) bool

func (Bytea) Get added in v0.13.23

func (dst Bytea) Get() interface{}

func (*Bytea) Set added in v0.13.23

func (dst *Bytea) Set(src interface{}) error

func (*Bytea) String added in v0.13.23

func (dst *Bytea) String() string

func (*Bytea) Type added in v0.13.23

func (*Bytea) Type() ValueType

type ByteaTransformer added in v0.13.23

type ByteaTransformer interface {
	TransformBytea(*Bytea) interface{}
}

type CIDR added in v0.13.23

type CIDR Inet

func (*CIDR) Equal added in v0.13.23

func (dst *CIDR) Equal(src CQType) bool

func (CIDR) Get added in v0.13.23

func (dst CIDR) Get() interface{}

func (*CIDR) Set added in v0.13.23

func (dst *CIDR) Set(src interface{}) error

func (*CIDR) String added in v0.13.23

func (dst *CIDR) String() string

func (*CIDR) Type added in v0.13.23

func (*CIDR) Type() ValueType

type CIDRArray added in v0.13.23

type CIDRArray struct {
	Elements   []CIDR
	Dimensions []ArrayDimension
	Status     Status
}

func (*CIDRArray) Equal added in v0.13.23

func (dst *CIDRArray) Equal(src CQType) bool

func (CIDRArray) Get added in v0.13.23

func (dst CIDRArray) Get() interface{}

func (*CIDRArray) Set added in v0.13.23

func (dst *CIDRArray) Set(src interface{}) error

func (*CIDRArray) String added in v0.13.23

func (dst *CIDRArray) String() string

func (*CIDRArray) Type added in v0.13.23

func (*CIDRArray) Type() ValueType

type CIDRArrayTransformer added in v0.13.23

type CIDRArrayTransformer interface {
	TransformCIDRArray(*CIDRArray) interface{}
}

type CIDRTransformer added in v0.13.23

type CIDRTransformer interface {
	TransformCIDR(*CIDR) interface{}
}

type CQType added in v0.13.23

type CQType interface {
	Set(v interface{}) error
	Get() interface{}
	String() string
	Equal(CQType) bool
	Type() ValueType
}

func NewCqTypeFromValueType added in v0.13.23

func NewCqTypeFromValueType(typ ValueType) CQType

type CQTypes added in v0.13.23

type CQTypes []CQType

func (CQTypes) Equal added in v0.13.23

func (c CQTypes) Equal(other CQTypes) bool

func (CQTypes) Len added in v0.13.23

func (c CQTypes) Len() int

func (CQTypes) MarshalJSON added in v0.13.23

func (c CQTypes) MarshalJSON() ([]byte, error)

func (CQTypes) String added in v0.13.23

func (c CQTypes) String() string

func (*CQTypes) UnmarshalJSON added in v0.13.23

func (c *CQTypes) UnmarshalJSON(b []byte) error

type ClientMeta

type ClientMeta interface {
	ID() string
}

type Column

type Column struct {
	// Name of column
	Name string `json:"name,omitempty"`
	// Value Type of column i.e String, UUID etc'
	Type ValueType `json:"type,omitempty"`
	// Description about column, this description is added as a comment in the database
	Description string `json:"-"`
	// Column Resolver allows to set you own data based on resolving this can be an API call or setting multiple embedded values etc'
	Resolver ColumnResolver `json:"-"`
	// Creation options allow modifying how column is defined when table is created
	CreationOptions ColumnCreationOptions `json:"creation_options,omitempty"`
	// IgnoreInTests is used to skip verifying the column is non-nil in integration tests.
	// By default, integration tests perform a fetch for all resources in cloudquery's test account, and
	// verify all columns are non-nil.
	// If IgnoreInTests is true, verification is skipped for this column.
	// Used when it is hard to create a reproducible environment with this column being non-nil (e.g. various error columns).
	IgnoreInTests bool `json:"-"`
}

Column definition for Table

type ColumnCreationOptions

type ColumnCreationOptions struct {
	PrimaryKey bool `json:"primary_key,omitempty"`
}

ColumnCreationOptions allow modification of how column is defined when table is created

type ColumnList

type ColumnList []Column

func (ColumnList) Get

func (c ColumnList) Get(name string) *Column

func (ColumnList) Index added in v0.13.16

func (c ColumnList) Index(col string) int

func (ColumnList) Names

func (c ColumnList) Names() []string

func (*ColumnList) UnmarshalJSON added in v0.13.23

func (c *ColumnList) UnmarshalJSON(data []byte) (err error)

type ColumnResolver

type ColumnResolver func(ctx context.Context, meta ClientMeta, resource *Resource, c Column) error

ColumnResolver is called for each row received in TableResolver's data fetch. execution holds all relevant information regarding execution as well as the Column called. resource holds the current row we are resolving the column for.

func ParentColumnResolver added in v0.11.0

func ParentColumnResolver(name string) ColumnResolver

ParentColumnResolver resolves a column from the parent's table data, if name isn't set the column will be set to null

func PathResolver

func PathResolver(path string) ColumnResolver

PathResolver resolves a field in the Resource.Item

Examples: PathResolver("Field") PathResolver("InnerStruct.Field") PathResolver("InnerStruct.InnerInnerStruct.Field")

type DefaultTransformer added in v0.13.23

type DefaultTransformer struct {
}

func (*DefaultTransformer) TransformBool added in v0.13.23

func (*DefaultTransformer) TransformBool(v *Bool) interface{}

func (*DefaultTransformer) TransformBytea added in v0.13.23

func (*DefaultTransformer) TransformBytea(v *Bytea) interface{}

func (*DefaultTransformer) TransformCIDR added in v0.13.23

func (*DefaultTransformer) TransformCIDR(v *CIDR) interface{}

func (*DefaultTransformer) TransformCIDRArray added in v0.13.23

func (*DefaultTransformer) TransformCIDRArray(v *CIDRArray) interface{}

func (*DefaultTransformer) TransformFloat8 added in v0.13.23

func (*DefaultTransformer) TransformFloat8(v *Float8) interface{}

func (*DefaultTransformer) TransformInet added in v0.13.23

func (*DefaultTransformer) TransformInet(v *Inet) interface{}

func (*DefaultTransformer) TransformInetArray added in v0.13.23

func (*DefaultTransformer) TransformInetArray(v *InetArray) interface{}

func (*DefaultTransformer) TransformInt8 added in v0.13.23

func (*DefaultTransformer) TransformInt8(v *Int8) interface{}

func (*DefaultTransformer) TransformInt8Array added in v0.13.23

func (*DefaultTransformer) TransformInt8Array(v *Int8Array) interface{}

func (*DefaultTransformer) TransformJSON added in v0.13.23

func (*DefaultTransformer) TransformJSON(v *JSON) interface{}

func (*DefaultTransformer) TransformMacaddr added in v0.13.23

func (*DefaultTransformer) TransformMacaddr(v *Macaddr) interface{}

func (*DefaultTransformer) TransformMacaddrArray added in v0.13.23

func (*DefaultTransformer) TransformMacaddrArray(v *MacaddrArray) interface{}

func (*DefaultTransformer) TransformText added in v0.13.23

func (*DefaultTransformer) TransformText(v *Text) interface{}

func (*DefaultTransformer) TransformTextArray added in v0.13.23

func (*DefaultTransformer) TransformTextArray(v *TextArray) interface{}

func (*DefaultTransformer) TransformTimestamptz added in v0.13.23

func (*DefaultTransformer) TransformTimestamptz(v *Timestamptz) interface{}

func (*DefaultTransformer) TransformUUID added in v0.13.23

func (*DefaultTransformer) TransformUUID(v *UUID) interface{}

func (*DefaultTransformer) TransformUUIDArray added in v0.13.23

func (*DefaultTransformer) TransformUUIDArray(v *UUIDArray) interface{}

type DestinationResource added in v0.13.16

type DestinationResource struct {
	TableName string  `json:"table_name"`
	Data      CQTypes `json:"data"`
}

This struct is what we send over the wire to destination. We dont want to reuse the same struct as otherwise we will have to comment on fields which don't get sent over the wire but still accessible code wise

type Float8 added in v0.13.23

type Float8 struct {
	Float  float64
	Status Status
}

func (*Float8) Equal added in v0.13.23

func (dst *Float8) Equal(src CQType) bool

func (Float8) Get added in v0.13.23

func (dst Float8) Get() interface{}

func (*Float8) Set added in v0.13.23

func (dst *Float8) Set(src interface{}) error

func (*Float8) String added in v0.13.23

func (dst *Float8) String() string

func (*Float8) Type added in v0.13.23

func (*Float8) Type() ValueType

type Float8Transformer added in v0.13.23

type Float8Transformer interface {
	TransformFloat8(*Float8) interface{}
}

type Inet added in v0.13.23

type Inet struct {
	IPNet  *net.IPNet
	Status Status
}

Inet represents both inet and cidr PostgreSQL types.

func (*Inet) Equal added in v0.13.23

func (dst *Inet) Equal(src CQType) bool

func (Inet) Get added in v0.13.23

func (dst Inet) Get() interface{}

func (*Inet) Set added in v0.13.23

func (dst *Inet) Set(src interface{}) error

func (*Inet) String added in v0.13.23

func (dst *Inet) String() string

func (*Inet) Type added in v0.13.23

func (*Inet) Type() ValueType

type InetArray added in v0.13.23

type InetArray struct {
	Elements   []Inet
	Dimensions []ArrayDimension
	Status     Status
}

func (*InetArray) Equal added in v0.13.23

func (dst *InetArray) Equal(src CQType) bool

func (InetArray) Get added in v0.13.23

func (dst InetArray) Get() interface{}

func (*InetArray) Set added in v0.13.23

func (dst *InetArray) Set(src interface{}) error

func (*InetArray) String added in v0.13.23

func (dst *InetArray) String() string

func (*InetArray) Type added in v0.13.23

func (*InetArray) Type() ValueType

type InetArrayTransformer added in v0.13.23

type InetArrayTransformer interface {
	TransformInetArray(*InetArray) interface{}
}

type InetTransformer added in v0.13.23

type InetTransformer interface {
	TransformInet(*Inet) interface{}
}

type InfinityModifier added in v0.13.23

type InfinityModifier int8
const (
	Infinity         InfinityModifier = 1
	None             InfinityModifier = 0
	NegativeInfinity InfinityModifier = -Infinity
)

type Int8 added in v0.13.23

type Int8 struct {
	Int    int64
	Status Status
}

func (*Int8) Equal added in v0.13.23

func (dst *Int8) Equal(src CQType) bool

func (Int8) Get added in v0.13.23

func (dst Int8) Get() interface{}

func (*Int8) Set added in v0.13.23

func (dst *Int8) Set(src interface{}) error

func (*Int8) String added in v0.13.23

func (dst *Int8) String() string

func (*Int8) Type added in v0.13.23

func (*Int8) Type() ValueType

type Int8Array added in v0.13.23

type Int8Array struct {
	Elements   []Int8
	Dimensions []ArrayDimension
	Status     Status
}

func (*Int8Array) Equal added in v0.13.23

func (dst *Int8Array) Equal(src CQType) bool

func (Int8Array) Get added in v0.13.23

func (dst Int8Array) Get() interface{}

func (*Int8Array) Set added in v0.13.23

func (dst *Int8Array) Set(src interface{}) error

func (*Int8Array) String added in v0.13.23

func (dst *Int8Array) String() string

func (*Int8Array) Type added in v0.13.23

func (*Int8Array) Type() ValueType

type Int8ArrayTransformer added in v0.13.23

type Int8ArrayTransformer interface {
	TransformInt8Array(*Int8Array) interface{}
}

type Int8Transformer added in v0.13.23

type Int8Transformer interface {
	TransformInt8(*Int8) interface{}
}

type JSON added in v0.13.23

type JSON struct {
	Bytes  []byte
	Status Status
}

func (*JSON) Equal added in v0.13.23

func (dst *JSON) Equal(src CQType) bool

func (JSON) Get added in v0.13.23

func (dst JSON) Get() interface{}

func (*JSON) Set added in v0.13.23

func (dst *JSON) Set(src interface{}) error

func (*JSON) String added in v0.13.23

func (dst *JSON) String() string

func (*JSON) Type added in v0.13.23

func (*JSON) Type() ValueType

type JSONTransformer added in v0.13.23

type JSONTransformer interface {
	TransformJSON(*JSON) interface{}
}

type LengthTableValidator

type LengthTableValidator struct{}

func (LengthTableValidator) Validate

func (LengthTableValidator) Validate(t *Table) error

type Macaddr added in v0.13.23

type Macaddr struct {
	Addr   net.HardwareAddr
	Status Status
}

func (*Macaddr) Equal added in v0.13.23

func (dst *Macaddr) Equal(src CQType) bool

func (Macaddr) Get added in v0.13.23

func (dst Macaddr) Get() interface{}

func (*Macaddr) Set added in v0.13.23

func (dst *Macaddr) Set(src interface{}) error

func (*Macaddr) String added in v0.13.23

func (dst *Macaddr) String() string

func (*Macaddr) Type added in v0.13.23

func (*Macaddr) Type() ValueType

type MacaddrArray added in v0.13.23

type MacaddrArray struct {
	Elements   []Macaddr
	Dimensions []ArrayDimension
	Status     Status
}

func (*MacaddrArray) Equal added in v0.13.23

func (dst *MacaddrArray) Equal(src CQType) bool

func (MacaddrArray) Get added in v0.13.23

func (dst MacaddrArray) Get() interface{}

func (*MacaddrArray) Set added in v0.13.23

func (dst *MacaddrArray) Set(src interface{}) error

func (*MacaddrArray) String added in v0.13.23

func (dst *MacaddrArray) String() string

func (*MacaddrArray) Type added in v0.13.23

func (*MacaddrArray) Type() ValueType

type MacaddrArrayTransformer added in v0.13.23

type MacaddrArrayTransformer interface {
	TransformMacaddrArray(*MacaddrArray) interface{}
}

type MacaddrTransformer added in v0.13.23

type MacaddrTransformer interface {
	TransformMacaddr(*Macaddr) interface{}
}

type Multiplexer added in v0.7.1

type Multiplexer func(meta ClientMeta) []ClientMeta

type Resource

type Resource struct {
	// Original resource item that wa from prior resolve
	Item interface{}
	// Set if this is an embedded table
	Parent *Resource
	// internal fields
	Table *Table
	// contains filtered or unexported fields
}

Resource represents a row in it's associated table, it carries a reference to the original item, and automatically generates an Id based on Table's Columns. Resource data can be accessed by the Get and Set methods

func NewResourceData

func NewResourceData(t *Table, parent *Resource, item interface{}) *Resource

func (*Resource) Columns

func (r *Resource) Columns() []string

func (*Resource) Get

func (r *Resource) Get(columnName string) CQType

func (*Resource) GetItem added in v0.13.15

func (r *Resource) GetItem() interface{}

func (*Resource) GetValues added in v0.13.16

func (r *Resource) GetValues() CQTypes

func (*Resource) ID added in v0.5.0

func (r *Resource) ID() uuid.UUID

func (*Resource) Set

func (r *Resource) Set(columnName string, value interface{}) error

Set sets a column with value. This does validation and conversion to one of concrete it returns an error just for backward compatibility and panics in case it fails

func (*Resource) SetItem added in v0.0.11

func (r *Resource) SetItem(item interface{})

Override original item (this is useful for apis that follow list/details pattern)

func (*Resource) ToDestinationResource added in v0.13.16

func (r *Resource) ToDestinationResource() DestinationResource

type Resources

type Resources []*Resource

func (Resources) ColumnNames

func (rr Resources) ColumnNames() []string

func (Resources) GetIds

func (rr Resources) GetIds() []uuid.UUID

func (Resources) TableName

func (rr Resources) TableName() string

type RowResolver

type RowResolver func(ctx context.Context, meta ClientMeta, resource *Resource) error

type Status added in v0.13.16

type Status byte
const (
	Undefined Status = iota
	Null
	Present
)

type SyncSummary added in v0.12.0

type SyncSummary struct {
	Resources uint64
	Errors    uint64
	Panics    uint64
}

This is deprecated

type Table

type Table struct {
	// Name of table
	Name string `json:"name"`
	// table description
	Description string `json:"description"`
	// Columns are the set of fields that are part of this table
	Columns ColumnList `json:"columns"`
	// Relations are a set of related tables defines
	Relations Tables `json:"relations"`
	// Resolver is the main entry point to fetching table data and
	Resolver TableResolver `json:"-"`
	// Multiplex returns re-purposed meta clients. The sdk will execute the table with each of them
	Multiplex Multiplexer `json:"-"`
	// PostResourceResolver is called after all columns have been resolved, but before the Resource is sent to be inserted. The ordering of resolvers is:
	//  (Table) Resolver → PreResourceResolver → ColumnResolvers → PostResourceResolver
	PostResourceResolver RowResolver `json:"-"`
	// PreResourceResolver is called before all columns are resolved but after Resource is created. The ordering of resolvers is:
	//  (Table) Resolver → PreResourceResolver → ColumnResolvers → PostResourceResolver
	PreResourceResolver RowResolver `json:"-"`

	// IgnoreInTests is used to exclude a table from integration tests.
	// By default, integration tests fetch all resources from cloudquery's test account, and verify all tables
	// have at least one row.
	// When IgnoreInTests is true, integration tests won't fetch from this table.
	// Used when it is hard to create a reproducible environment with a row in this table.
	IgnoreInTests bool `json:"ignore_in_tests"`

	// Parent is the parent table in case this table is called via parent table (i.e. relation)
	Parent *Table `json:"-"`
}

func (*Table) Column

func (t *Table) Column(name string) *Column

func (*Table) OverwriteOrAddColumn added in v0.13.0

func (t *Table) OverwriteOrAddColumn(column *Column)

If the column with the same name exists, overwrites it. Otherwise, adds the column to the beginning of the table.

func (*Table) PrimaryKeys added in v0.0.4

func (t *Table) PrimaryKeys() []string

func (*Table) TableNames

func (t *Table) TableNames() []string

func (*Table) ValidateColumnNames added in v0.13.11

func (t *Table) ValidateColumnNames() error

func (*Table) ValidateDuplicateColumns added in v0.0.4

func (t *Table) ValidateDuplicateColumns() error

func (*Table) ValidateName added in v0.13.11

func (t *Table) ValidateName() error

type TableResolver

type TableResolver func(ctx context.Context, meta ClientMeta, parent *Resource, res chan<- interface{}) error

TableResolver is the main entry point when a table is sync is called.

Table resolver has 3 main arguments: - meta(ClientMeta): is the client returned by the plugin.Provider Configure call - parent(Resource): resource is the parent resource in case this table is called via parent table (i.e. relation) - res(chan interface{}): is a channel to pass results fetched by the TableResolver

type TableValidator

type TableValidator interface {
	Validate(t *Table) error
}

type Tables added in v0.0.4

type Tables []*Table

func (Tables) Get added in v0.13.15

func (tt Tables) Get(name string) *Table

Get return table by name

func (Tables) TableNames added in v0.0.4

func (tt Tables) TableNames() []string

func (Tables) ValidateColumnNames added in v0.13.11

func (tt Tables) ValidateColumnNames() error

func (Tables) ValidateDuplicateColumns added in v0.0.4

func (tt Tables) ValidateDuplicateColumns() error

func (Tables) ValidateDuplicateTables added in v0.0.6

func (tt Tables) ValidateDuplicateTables() error

func (Tables) ValidateTableNames added in v0.13.11

func (tt Tables) ValidateTableNames() error

type Text added in v0.13.23

type Text struct {
	Str    string
	Status Status
}

func (*Text) Equal added in v0.13.23

func (dst *Text) Equal(src CQType) bool

func (Text) Get added in v0.13.23

func (dst Text) Get() interface{}

func (*Text) Set added in v0.13.23

func (dst *Text) Set(src interface{}) error

func (*Text) String added in v0.13.23

func (dst *Text) String() string

func (*Text) Type added in v0.13.23

func (*Text) Type() ValueType

type TextArray added in v0.13.23

type TextArray struct {
	Elements   []Text
	Dimensions []ArrayDimension
	Status     Status
}

func (*TextArray) Equal added in v0.13.23

func (dst *TextArray) Equal(src CQType) bool

func (TextArray) Get added in v0.13.23

func (dst TextArray) Get() interface{}

func (*TextArray) Set added in v0.13.23

func (dst *TextArray) Set(src interface{}) error

func (*TextArray) String added in v0.13.23

func (dst *TextArray) String() string

func (*TextArray) Type added in v0.13.23

func (*TextArray) Type() ValueType

type TextArrayTransformer added in v0.13.23

type TextArrayTransformer interface {
	TransformTextArray(*TextArray) interface{}
}

type TextTransformer added in v0.13.23

type TextTransformer interface {
	TransformText(*Text) interface{}
}

type Timestamptz added in v0.13.23

type Timestamptz struct {
	Time             time.Time
	Status           Status
	InfinityModifier InfinityModifier
}

func (*Timestamptz) DecodeText added in v0.13.23

func (dst *Timestamptz) DecodeText(src []byte) error

func (*Timestamptz) Equal added in v0.13.23

func (dst *Timestamptz) Equal(src CQType) bool

func (Timestamptz) Get added in v0.13.23

func (dst Timestamptz) Get() interface{}

func (*Timestamptz) Set added in v0.13.23

func (dst *Timestamptz) Set(src interface{}) error

func (*Timestamptz) String added in v0.13.23

func (dst *Timestamptz) String() string

func (*Timestamptz) Type added in v0.13.23

func (*Timestamptz) Type() ValueType

type TimestamptzTransformer added in v0.13.23

type TimestamptzTransformer interface {
	TransformTimestamptz(*Timestamptz) interface{}
}

type UUID added in v0.13.23

type UUID struct {
	Bytes  [16]byte
	Status Status
}

func (*UUID) Equal added in v0.13.23

func (dst *UUID) Equal(src CQType) bool

func (UUID) Get added in v0.13.23

func (dst UUID) Get() interface{}

func (*UUID) Set added in v0.13.23

func (dst *UUID) Set(src interface{}) error

func (*UUID) String added in v0.13.23

func (dst *UUID) String() string

func (*UUID) Type added in v0.13.23

func (*UUID) Type() ValueType

type UUIDArray added in v0.13.23

type UUIDArray struct {
	Elements   []UUID
	Dimensions []ArrayDimension
	Status     Status
}

func (*UUIDArray) Equal added in v0.13.23

func (dst *UUIDArray) Equal(src CQType) bool

func (UUIDArray) Get added in v0.13.23

func (dst UUIDArray) Get() interface{}

func (*UUIDArray) Set added in v0.13.23

func (dst *UUIDArray) Set(src interface{}) error

func (*UUIDArray) String added in v0.13.23

func (dst *UUIDArray) String() string

func (*UUIDArray) Type added in v0.13.23

func (*UUIDArray) Type() ValueType

type UUIDArrayTransformer added in v0.13.23

type UUIDArrayTransformer interface {
	TransformUUIDArray(*UUIDArray) interface{}
}

type UUIDTransformer added in v0.13.23

type UUIDTransformer interface {
	TransformUUID(*UUID) interface{}
}

type ValueType

type ValueType int
const (
	TypeInvalid ValueType = iota
	TypeBool
	TypeInt
	TypeFloat
	TypeUUID
	TypeString
	TypeByteArray
	TypeStringArray
	TypeIntArray
	TypeTimestamp
	TypeJSON
	TypeUUIDArray
	TypeInet
	TypeInetArray
	TypeCIDR
	TypeCIDRArray
	TypeMacAddr
	TypeMacAddrArray
	TypeTimeIntervalDeprecated
	TypeEnd
)

func (ValueType) String

func (r ValueType) String() string

func (*ValueType) UnmarshalJSON added in v0.13.23

func (r *ValueType) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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