index

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexSliceToJSON

func IndexSliceToJSON(e []Index) json.RawMessage

func IndexToJSON

func IndexToJSON(e Index) json.RawMessage

func StatusSliceToJSON

func StatusSliceToJSON(in []Status) json.RawMessage

func TypeSliceToJSON

func TypeSliceToJSON(in []Type) json.RawMessage

Types

type Index

type Index struct {
	UUID          uuid.UUID                `json:"uuid"`
	Identifier    string                   `json:"identifier"`
	Type          Type                     `json:"type"`
	Fields        []index_field.IndexField `json:"fields"`
	Status        Status                   `json:"status"`
	CreatedAt     time.Time                `json:"created_at"`
	UpdatedAt     time.Time                `json:"updated_at"`
	CreatedByUUID uuid.UUID                `json:"created_by_uuid"`
	UpdatedByUUID uuid.UUID                `json:"updated_by_uuid"`
}

func IndexFromJSON

func IndexFromJSON(data json.RawMessage) Index

func IndexSliceFromJSON

func IndexSliceFromJSON(data json.RawMessage) []Index

func NewIndexSliceWithRandomValues

func NewIndexSliceWithRandomValues(n int) []Index

func NewIndexWithRandomValues

func NewIndexWithRandomValues() Index

func (Index) ArrayFieldIdentifierToType

func (e Index) ArrayFieldIdentifierToType() map[string]types.FieldType

func (Index) EntityIdentifier

func (e Index) EntityIdentifier() string

func (Index) FieldIdentfierToTypeMap

func (e Index) FieldIdentfierToTypeMap() map[string]types.FieldType

func (Index) IsDependant

func (e Index) IsDependant() bool

func (Index) OrderedFieldIdentifiers added in v1.0.35

func (e Index) OrderedFieldIdentifiers() []string

func (Index) String

func (e Index) String() string

func (Index) ToJSON

func (e Index) ToJSON() json.RawMessage

type Status

type Status int64
const (
	STATUS_INVALID Status = iota
	STATUS_ACTIVE
	STATUS_DISABLED
)

func JSONToStatusSlice

func JSONToStatusSlice(in json.RawMessage) []Status

func StatusFromPointerString

func StatusFromPointerString(in *string) Status

func StatusFromString

func StatusFromString(in string) Status

func (Status) String

func (e Status) String() string

func (Status) StringPtr

func (e Status) StringPtr() *string

func (Status) ToInt64

func (e Status) ToInt64() int64

type Type

type Type int64
const (
	TYPE_INVALID Type = iota
	TYPE_INDEX
	TYPE_PRIMARY
	TYPE_UNIQUE
	TYPE_FULLTEXT
)

func JSONToTypeSlice

func JSONToTypeSlice(in json.RawMessage) []Type

func TypeFromPointerString

func TypeFromPointerString(in *string) Type

func TypeFromString

func TypeFromString(in string) Type

func (Type) String

func (e Type) String() string

func (Type) StringPtr

func (e Type) StringPtr() *string

func (Type) ToInt64

func (e Type) ToInt64() int64

Jump to

Keyboard shortcuts

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