types

package
v0.0.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STRING  = "string"
	INT64   = "int64"
	FLOAT64 = "float64"
	BOOL    = "bool"
	TIME    = "time"
	BYTES   = "bytes"
)
View Source
const (
	BatchFeatureCategory  = "batch"
	StreamFeatureCategory = "stream"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendType

type BackendType string
const (
	POSTGRES BackendType = "postgres"
	REDIS    BackendType = "redis"
)

type CreateEntityOpt

type CreateEntityOpt struct {
	EntityName  string
	Length      int
	Description string
}

type CreateFeatureOpt

type CreateFeatureOpt struct {
	FeatureName string
	GroupName   string
	DBValueType string
	Description string
}

type CreateGroupOpt added in v0.0.3

type CreateGroupOpt struct {
	GroupName   string
	EntityName  string
	Description string
}

type CsvDataSource

type CsvDataSource struct {
	Reader    io.Reader
	Delimiter string
}

type Entity

type Entity struct {
	ID     int    `db:"id"`
	Name   string `db:"name"`
	Length int    `db:"length"`

	Description string    `db:"description"`
	CreateTime  time.Time `db:"create_time"`
	ModifyTime  time.Time `db:"modify_time"`
}

func (*Entity) Copy added in v0.0.2

func (e *Entity) Copy() *Entity

func (*Entity) String

func (e *Entity) String() string

type EntityList added in v0.0.2

type EntityList []*Entity

func (EntityList) Copy added in v0.0.2

func (l EntityList) Copy() EntityList

func (*EntityList) Filter added in v0.0.2

func (l *EntityList) Filter(filter func(*Entity) bool) (rs EntityList)

func (*EntityList) Find added in v0.0.2

func (l *EntityList) Find(find func(*Entity) bool) *Entity

type EntityRow

type EntityRow struct {
	EntityKey string `db:"entity_key"`
	UnixTime  int64  `db:"unix_time"`
}

type ExportFeatureValuesOpt

type ExportFeatureValuesOpt struct {
	RevisionID   int
	FeatureNames []string
	Limit        *uint64
}

type Feature

type Feature struct {
	ID          int    `db:"id"`
	Name        string `db:"name"`
	ValueType   string `db:"value_type"`
	DBValueType string `db:"db_value_type"`

	Description string    `db:"description"`
	CreateTime  time.Time `db:"create_time"`
	ModifyTime  time.Time `db:"modify_time"`

	GroupID int `db:"group_id"`
	Group   *Group
}

func (*Feature) Copy added in v0.0.2

func (f *Feature) Copy() *Feature

func (*Feature) Entity added in v0.0.2

func (f *Feature) Entity() *Entity

func (*Feature) OnlineRevisionID

func (f *Feature) OnlineRevisionID() *int

func (*Feature) String

func (f *Feature) String() string

type FeatureDataSet

type FeatureDataSet map[string][]FeatureKV

func NewFeatureDataSet

func NewFeatureDataSet() FeatureDataSet

type FeatureKV

type FeatureKV struct {
	FeatureName  string
	FeatureValue interface{}
}

func NewFeatureKV

func NewFeatureKV(name string, value interface{}) FeatureKV

type FeatureList

type FeatureList []*Feature

func (FeatureList) Copy added in v0.0.2

func (l FeatureList) Copy() FeatureList

func (*FeatureList) Filter

func (l *FeatureList) Filter(filter func(*Feature) bool) (rs FeatureList)

func (*FeatureList) Find added in v0.0.2

func (l *FeatureList) Find(find func(*Feature) bool) *Feature

func (*FeatureList) IDs added in v0.0.3

func (l *FeatureList) IDs() (ids []int)

func (*FeatureList) Len

func (l *FeatureList) Len() int

func (*FeatureList) Names

func (l *FeatureList) Names() (names []string)

type FeatureValues added in v0.0.2

type FeatureValues struct {
	EntityName      string
	EntityKey       string
	FeatureNames    []string
	FeatureValueMap map[string]interface{}
}

func (*FeatureValues) FeatureValueSlice added in v0.0.2

func (fv *FeatureValues) FeatureValueSlice() []interface{}

type Group added in v0.0.3

type Group struct {
	ID       int    `db:"id"`
	Name     string `db:"name"`
	Category string `db:"category"`

	Description string    `db:"description"`
	CreateTime  time.Time `db:"create_time"`
	ModifyTime  time.Time `db:"modify_time"`

	EntityID         int  `db:"entity_id"`
	OnlineRevisionID *int `db:"online_revision_id"`

	Entity *Entity
}

func (*Group) Copy added in v0.0.3

func (fg *Group) Copy() *Group

func (*Group) String added in v0.0.3

func (fg *Group) String() string

type GroupList added in v0.0.3

type GroupList []*Group

func (GroupList) Copy added in v0.0.3

func (l GroupList) Copy() GroupList

func (*GroupList) Filter added in v0.0.3

func (l *GroupList) Filter(filter func(*Group) bool) (rs GroupList)

func (*GroupList) Find added in v0.0.3

func (l *GroupList) Find(find func(*Group) bool) *Group

type ImportOpt added in v0.0.3

type ImportOpt struct {
	GroupID     int
	Description string
	DataSource  CsvDataSource
	Revision    *int64
}

type JoinOpt added in v0.0.3

type JoinOpt struct {
	FeatureIDs []int
	EntityRows <-chan EntityRow
}

type JoinResult added in v0.0.2

type JoinResult struct {
	Header []string
	Data   <-chan []interface{}
}

type ListFeatureOpt

type ListFeatureOpt struct {
	EntityName   *string
	GroupName    *string
	FeatureNames *[]string
}

type MetadataStoreConfig

type MetadataStoreConfig struct {
	Backend  BackendType  `yaml:"backend"`
	Postgres *PostgresOpt `yaml:"postgres"`
}

type OfflineStoreConfig

type OfflineStoreConfig struct {
	Backend  BackendType  `yaml:"backend"`
	Postgres *PostgresOpt `yaml:"postgres"`
}

type OnlineGetOpt added in v0.0.3

type OnlineGetOpt struct {
	FeatureNames []string
	EntityKey    string
}

type OnlineMultiGetOpt added in v0.0.3

type OnlineMultiGetOpt struct {
	FeatureIDs []int
	EntityKeys []string
}

type OnlineStoreConfig

type OnlineStoreConfig struct {
	Backend  BackendType  `yaml:"backend"`
	Postgres *PostgresOpt `yaml:"postgres"`
	Redis    *RedisOpt    `yaml:"redis"`
}

type OomStoreConfig

type OomStoreConfig struct {
	MetadataStore MetadataStoreConfig `yaml:"metadata-store"`
	OfflineStore  OfflineStoreConfig  `yaml:"offline-store"`
	OnlineStore   OnlineStoreConfig   `yaml:"online-store"`
}

type PostgresOpt

type PostgresOpt struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

type RawFeatureValueRecord

type RawFeatureValueRecord struct {
	Record []interface{}
	Error  error
}

func (*RawFeatureValueRecord) EntityKey

func (r *RawFeatureValueRecord) EntityKey() string

func (*RawFeatureValueRecord) ValueAt

func (r *RawFeatureValueRecord) ValueAt(i int) interface{}

type RedisOpt

type RedisOpt struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Password string `yaml:"password"`
	Database int    `yaml:"database"`
}

type Revision

type Revision struct {
	ID        int    `db:"id"`
	Revision  int64  `db:"revision"`
	DataTable string `db:"data_table"`
	Anchored  bool   `db:"anchored"`

	Description string    `db:"description"`
	CreateTime  time.Time `db:"create_time"`
	ModifyTime  time.Time `db:"modify_time"`

	GroupID int `db:"group_id"`
	Group   *Group
}

func (*Revision) Copy added in v0.0.2

func (r *Revision) Copy() *Revision

type RevisionList added in v0.0.2

type RevisionList []*Revision

func (RevisionList) Copy added in v0.0.2

func (l RevisionList) Copy() RevisionList

func (*RevisionList) Filter added in v0.0.2

func (l *RevisionList) Filter(filter func(*Revision) bool) (rs RevisionList)

func (*RevisionList) Find added in v0.0.2

func (l *RevisionList) Find(find func(*Revision) bool) *Revision

type SyncOpt added in v0.0.2

type SyncOpt struct {
	RevisionID int
}

type UpdateEntityOpt

type UpdateEntityOpt struct {
	EntityName     string
	NewDescription string
}

type UpdateFeatureOpt

type UpdateFeatureOpt struct {
	FeatureName    string
	NewDescription string
}

type UpdateGroupOpt added in v0.0.3

type UpdateGroupOpt struct {
	GroupName           string
	NewDescription      *string
	NewOnlineRevisionID *int
}

Jump to

Keyboard shortcuts

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