Documentation
¶
Index ¶
- Constants
- func FromAnyPb(impl *anypb.Any) data.Value
- func FromFieldPb(impl *protobufs.DatabaseField) data.Field
- func FromRequest(r data.Request) data.Field
- func FromSchemaPb(impl *protobufs.DatabaseFieldSchema) data.FieldSchema
- func NewChoice(index int64) data.Choice
- func NewCompleteChoice(index int64, options []string) data.CompleteChoice
- func NewEntityList(entities []string) data.EntityList
- func NewSchema(name, fieldType string) data.FieldSchema
- func NewValue() data.Value
- func PrefixedType(t string) string
- func ToAnyPb(v data.Value) *anypb.Any
- func ToFieldPb(f data.Field) *protobufs.DatabaseField
- func ToSchemaPb(s data.FieldSchema) *protobufs.DatabaseFieldSchema
- func Types() []string
- func UnprefixedType(t string) string
- type ChoiceImpl
- func (c *ChoiceImpl) Count() int
- func (c *ChoiceImpl) Index() int64
- func (c *ChoiceImpl) IsValid() bool
- func (c *ChoiceImpl) Option() string
- func (c *ChoiceImpl) Options() []string
- func (c *ChoiceImpl) Select(option string) bool
- func (c *ChoiceImpl) SetIndex(index int64) data.Choice
- func (c *ChoiceImpl) SetOptions(options []string) data.Choice
- type EntityListImpl
- func (e *EntityListImpl) Add(entity string) bool
- func (e *EntityListImpl) Clear() data.EntityList
- func (e *EntityListImpl) Contains(entity string) bool
- func (e *EntityListImpl) Count() int
- func (e *EntityListImpl) GetEntities() []string
- func (e *EntityListImpl) Remove(entity string) bool
- func (e *EntityListImpl) SetEntities(entities []string) data.EntityList
- type Field
- type Schema
- func (me *Schema) AsChoiceFieldSchema() data.ChoiceFieldSchema
- func (me *Schema) GetChoices() []string
- func (me *Schema) GetFieldName() string
- func (me *Schema) GetFieldType() string
- func (me *Schema) GetReadPermissions() []string
- func (me *Schema) GetWritePermissions() []string
- func (me *Schema) IsBinaryFile() bool
- func (me *Schema) IsBool() bool
- func (me *Schema) IsChoice() bool
- func (me *Schema) IsEntityList() bool
- func (me *Schema) IsEntityReference() bool
- func (me *Schema) IsFloat() bool
- func (me *Schema) IsInt() bool
- func (me *Schema) IsString() bool
- func (me *Schema) IsTimestamp() bool
- func (me *Schema) SetChoices(options []string) data.ChoiceFieldSchema
- type Value
- func (v *Value) GetBinaryFile() string
- func (v *Value) GetBool() bool
- func (v *Value) GetChoice() data.Choice
- func (v *Value) GetEntityList() data.EntityList
- func (v *Value) GetEntityReference() string
- func (v *Value) GetFloat() float64
- func (v *Value) GetInt() int64
- func (v *Value) GetString() string
- func (v *Value) GetTimestamp() time.Time
- func (v *Value) GetType() string
- func (v *Value) IsBinaryFile() bool
- func (v *Value) IsBool() bool
- func (v *Value) IsChoice() bool
- func (v *Value) IsEntityList() bool
- func (v *Value) IsEntityReference() bool
- func (v *Value) IsFloat() bool
- func (v *Value) IsInt() bool
- func (v *Value) IsNil() bool
- func (v *Value) IsString() bool
- func (v *Value) IsTimestamp() bool
- func (v *Value) SetBinaryFile(b interface{}) data.Value
- func (v *Value) SetBool(b interface{}) data.Value
- func (v *Value) SetChoice(selected interface{}) data.Value
- func (v *Value) SetEntityList(entities interface{}) data.Value
- func (v *Value) SetEntityReference(e interface{}) data.Value
- func (v *Value) SetFloat(f interface{}) data.Value
- func (v *Value) SetInt(i interface{}) data.Value
- func (v *Value) SetString(s interface{}) data.Value
- func (v *Value) SetTimestamp(t interface{}) data.Value
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 FromFieldPb ¶
func FromFieldPb(impl *protobufs.DatabaseField) data.Field
func FromSchemaPb ¶
func FromSchemaPb(impl *protobufs.DatabaseFieldSchema) data.FieldSchema
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 PrefixedType ¶ added in v0.1.12
func ToSchemaPb ¶
func ToSchemaPb(s data.FieldSchema) *protobufs.DatabaseFieldSchema
func UnprefixedType ¶ added in v0.1.12
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 (*Field) GetFieldName ¶
func (*Field) GetWriteTime ¶
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 (*Schema) GetFieldName ¶
func (*Schema) GetFieldType ¶
func (*Schema) GetReadPermissions ¶ added in v0.1.5
func (*Schema) GetWritePermissions ¶ added in v0.1.5
func (*Schema) IsBinaryFile ¶ added in v0.1.5
func (*Schema) IsEntityList ¶ added in v0.1.5
func (*Schema) IsEntityReference ¶ added in v0.1.5
func (*Schema) IsTimestamp ¶ added in v0.1.5
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 (*Value) GetEntityList ¶ added in v0.1.5
func (v *Value) GetEntityList() data.EntityList
func (*Value) GetEntityReference ¶
func (*Value) GetTimestamp ¶
func (*Value) IsBinaryFile ¶
func (*Value) IsEntityList ¶ added in v0.1.5
func (*Value) IsEntityReference ¶
func (*Value) IsTimestamp ¶
func (*Value) SetBinaryFile ¶
func (*Value) SetEntityList ¶ added in v0.1.5
func (*Value) SetEntityReference ¶
func (*Value) SetTimestamp ¶
Click to show internal directories.
Click to hide internal directories.