field

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Int             = "Int"
	Float           = "Float"
	String          = "String"
	Bool            = "Bool"
	BinaryFile      = "BinaryFile"
	EntityReference = "EntityReference"
	Timestamp       = "Timestamp"
	Choice          = "Choice"
	EntityList      = "EntityList"
)

Variables

This section is empty.

Functions

func FromAnyPb

func FromAnyPb(impl *anypb.Any) data.Value

func FromFieldPb

func FromFieldPb(impl *protobufs.DatabaseField) data.Field

func FromRequest

func FromRequest(r data.Request) data.Field

func NewChoice added in v0.1.5

func NewChoice(index int64) data.Choice

func NewCompleteChoice added in v0.1.5

func NewCompleteChoice(index int64, options []string) data.CompleteChoice

func NewEntityList added in v0.1.5

func NewEntityList(entities []string) data.EntityList

NewEntityList creates a new EntityList with the given entities

func NewSchema added in v0.1.5

func NewSchema(name, fieldType string) data.FieldSchema

func NewValue

func NewValue() data.Value

func PrefixedType added in v0.1.12

func PrefixedType(t string) string

func ToAnyPb

func ToAnyPb(v data.Value) *anypb.Any

func ToFieldPb

func ToFieldPb(f data.Field) *protobufs.DatabaseField

func Types added in v0.1.5

func Types() []string

func UnprefixedType added in v0.1.12

func UnprefixedType(t string) string

Types

type ChoiceImpl added in v0.1.5

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

func (*ChoiceImpl) Count added in v0.1.5

func (c *ChoiceImpl) Count() int

func (*ChoiceImpl) Index added in v0.1.5

func (c *ChoiceImpl) Index() int64

func (*ChoiceImpl) IsValid added in v0.1.5

func (c *ChoiceImpl) IsValid() bool

func (*ChoiceImpl) Option added in v0.1.5

func (c *ChoiceImpl) Option() string

func (*ChoiceImpl) Options added in v0.1.5

func (c *ChoiceImpl) Options() []string

func (*ChoiceImpl) Select added in v0.1.5

func (c *ChoiceImpl) Select(option string) bool

func (*ChoiceImpl) SetIndex added in v0.1.5

func (c *ChoiceImpl) SetIndex(index int64) data.Choice

func (*ChoiceImpl) SetOptions added in v0.1.5

func (c *ChoiceImpl) SetOptions(options []string) data.Choice

type EntityListImpl added in v0.1.5

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

EntityListImpl implements the EntityList interface

func (*EntityListImpl) Add added in v0.1.5

func (e *EntityListImpl) Add(entity string) bool

func (*EntityListImpl) Clear added in v0.1.5

func (e *EntityListImpl) Clear() data.EntityList

func (*EntityListImpl) Contains added in v0.1.5

func (e *EntityListImpl) Contains(entity string) bool

func (*EntityListImpl) Count added in v0.1.5

func (e *EntityListImpl) Count() int

func (*EntityListImpl) GetEntities added in v0.1.5

func (e *EntityListImpl) GetEntities() []string

func (*EntityListImpl) Remove added in v0.1.5

func (e *EntityListImpl) Remove(entity string) bool

func (*EntityListImpl) SetEntities added in v0.1.5

func (e *EntityListImpl) SetEntities(entities []string) data.EntityList

type Field

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

func (*Field) GetEntityId

func (f *Field) GetEntityId() string

func (*Field) GetFieldName

func (f *Field) GetFieldName() string

func (*Field) GetValue

func (f *Field) GetValue() data.Value

func (*Field) GetWriteTime

func (f *Field) GetWriteTime() time.Time

func (*Field) GetWriter

func (f *Field) GetWriter() string

type Schema

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

func (*Schema) AsChoiceFieldSchema added in v0.1.5

func (me *Schema) AsChoiceFieldSchema() data.ChoiceFieldSchema

func (*Schema) GetChoices added in v0.1.5

func (me *Schema) GetChoices() []string

func (*Schema) GetFieldName

func (me *Schema) GetFieldName() string

func (*Schema) GetFieldType

func (me *Schema) GetFieldType() string

func (*Schema) GetReadPermissions added in v0.1.5

func (me *Schema) GetReadPermissions() []string

func (*Schema) GetWritePermissions added in v0.1.5

func (me *Schema) GetWritePermissions() []string

func (*Schema) IsBinaryFile added in v0.1.5

func (me *Schema) IsBinaryFile() bool

func (*Schema) IsBool added in v0.1.5

func (me *Schema) IsBool() bool

func (*Schema) IsChoice added in v0.1.5

func (me *Schema) IsChoice() bool

func (*Schema) IsEntityList added in v0.1.5

func (me *Schema) IsEntityList() bool

func (*Schema) IsEntityReference added in v0.1.5

func (me *Schema) IsEntityReference() bool

func (*Schema) IsFloat added in v0.1.5

func (me *Schema) IsFloat() bool

func (*Schema) IsInt added in v0.1.5

func (me *Schema) IsInt() bool

func (*Schema) IsString added in v0.1.5

func (me *Schema) IsString() bool

func (*Schema) IsTimestamp added in v0.1.5

func (me *Schema) IsTimestamp() bool

func (*Schema) SetChoices added in v0.1.5

func (me *Schema) SetChoices(options []string) data.ChoiceFieldSchema

type Value

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

func (*Value) GetBinaryFile

func (v *Value) GetBinaryFile() string

func (*Value) GetBool

func (v *Value) GetBool() bool

func (*Value) GetChoice added in v0.1.5

func (v *Value) GetChoice() data.Choice

func (*Value) GetEntityList added in v0.1.5

func (v *Value) GetEntityList() data.EntityList

func (*Value) GetEntityReference

func (v *Value) GetEntityReference() string

func (*Value) GetFloat

func (v *Value) GetFloat() float64

func (*Value) GetInt

func (v *Value) GetInt() int64

func (*Value) GetString

func (v *Value) GetString() string

func (*Value) GetTimestamp

func (v *Value) GetTimestamp() time.Time

func (*Value) GetType

func (v *Value) GetType() string

func (*Value) IsBinaryFile

func (v *Value) IsBinaryFile() bool

func (*Value) IsBool

func (v *Value) IsBool() bool

func (*Value) IsChoice added in v0.1.5

func (v *Value) IsChoice() bool

func (*Value) IsEntityList added in v0.1.5

func (v *Value) IsEntityList() bool

func (*Value) IsEntityReference

func (v *Value) IsEntityReference() bool

func (*Value) IsFloat

func (v *Value) IsFloat() bool

func (*Value) IsInt

func (v *Value) IsInt() bool

func (*Value) IsNil added in v0.0.24

func (v *Value) IsNil() bool

func (*Value) IsString

func (v *Value) IsString() bool

func (*Value) IsTimestamp

func (v *Value) IsTimestamp() bool

func (*Value) SetBinaryFile

func (v *Value) SetBinaryFile(b interface{}) data.Value

func (*Value) SetBool

func (v *Value) SetBool(b interface{}) data.Value

func (*Value) SetChoice added in v0.1.5

func (v *Value) SetChoice(selected interface{}) data.Value

func (*Value) SetEntityList added in v0.1.5

func (v *Value) SetEntityList(entities interface{}) data.Value

func (*Value) SetEntityReference

func (v *Value) SetEntityReference(e interface{}) data.Value

func (*Value) SetFloat

func (v *Value) SetFloat(f interface{}) data.Value

func (*Value) SetInt

func (v *Value) SetInt(i interface{}) data.Value

func (*Value) SetString

func (v *Value) SetString(s interface{}) data.Value

func (*Value) SetTimestamp

func (v *Value) SetTimestamp(t interface{}) data.Value

Jump to

Keyboard shortcuts

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