types

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BatchFeatureCategory  = "batch"
	StreamFeatureCategory = "stream"
)
View Source
const (
	STRING     = "string"
	INT8       = "int8"
	INT16      = "int16"
	INT32      = "int32"
	INT64      = "int64"
	FLOAT32    = "float32"
	FLOAT64    = "float64"
	BOOL       = "bool"
	TIME       = "time"
	BYTE_ARRAY = "byte_array"
)

Variables

This section is empty.

Functions

func FeatureCsvHeader

func FeatureCsvHeader() string

Types

type BackendType

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

type CreateEntityOpt

type CreateEntityOpt struct {
	Name        string
	Length      int
	Description string
}

type CreateFeatureGroupOpt

type CreateFeatureGroupOpt struct {
	Name        string
	EntityName  string
	Description string
}

type CreateFeatureOpt

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

type CsvDataSource

type CsvDataSource struct {
	Reader    io.Reader
	Delimiter string
}

type Entity

type Entity struct {
	ID     int16  `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) String

func (e *Entity) String() string

type EntityRow

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

type EntityRowWithFeatures

type EntityRowWithFeatures struct {
	EntityRow
	FeatureValues []FeatureKV
}

type ExportFeatureValuesOpt

type ExportFeatureValuesOpt struct {
	GroupName     string
	GroupRevision *int64
	FeatureNames  []string
	Limit         *uint64
}

type Feature

type Feature struct {
	ID          int16  `db:"id"`
	Name        string `db:"name"`
	GroupName   string `db:"group_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"`

	EntityName string `db:"entity_name"`
	Category   string `db:"category"`

	OnlineRevisionID *int32  `db:"online_revision_id"`
	OnlineRevision   *int64  `db:"online_revision"`
	OfflineRevision  *int64  `db:"offline_revision"`
	OfflineDataTable *string `db:"offline_data_table"`
}

func (*Feature) String

func (rf *Feature) String() string

func (*Feature) ToCsvRecord

func (rf *Feature) ToCsvRecord() string

type FeatureDataSet

type FeatureDataSet map[string][]FeatureKV

func NewFeatureDataSet

func NewFeatureDataSet() FeatureDataSet

type FeatureGroup

type FeatureGroup struct {
	ID               int16  `db:"id"`
	Name             string `db:"name"`
	EntityName       string `db:"entity_name"`
	OnlineRevisionID *int32 `db:"online_revision_id"`
	Category         string `db:"category"`

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

	OnlineRevision   *int64  `db:"online_revision"`
	OfflineRevision  *int64  `db:"offline_revision"`
	OfflineDataTable *string `db:"offline_data_table"`
}

func (*FeatureGroup) String

func (fg *FeatureGroup) String() string

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) Filter

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

func (*FeatureList) Ids

func (l *FeatureList) Ids() (ids []int16)

func (*FeatureList) Len

func (l *FeatureList) Len() int

func (*FeatureList) Names

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

type FeatureValueMap

type FeatureValueMap map[string]interface{}

type GetHistoricalFeatureValuesOpt

type GetHistoricalFeatureValuesOpt struct {
	FeatureNames []string
	EntityRows   []EntityRow
}

type GetOnlineFeatureValuesOpt

type GetOnlineFeatureValuesOpt struct {
	FeatureNames []string
	EntityKey    string
}

type ImportBatchFeaturesOpt

type ImportBatchFeaturesOpt struct {
	GroupName   string
	Description string
	DataSource  CsvDataSource
}

type ListFeatureOpt

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

type MaterializeOpt

type MaterializeOpt struct {
	GroupName     string
	GroupRevision *int64
}

type MetadataStoreConfig

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

type MultiGetOnlineFeatureValuesOpt

type MultiGetOnlineFeatureValuesOpt struct {
	FeatureNames []string
	EntityKeys   []string
}

type OfflineStoreConfig

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

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        int32  `db:"id"`
	Revision  int64  `db:"revision"`
	GroupName string `db:"group_name"`
	DataTable string `db:"data_table"`

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

type RevisionRange

type RevisionRange struct {
	MinRevision int64  `db:"min_revision"`
	MaxRevision int64  `db:"max_revision"`
	DataTable   string `db:"data_table"`
}

type UpdateEntityOpt

type UpdateEntityOpt struct {
	EntityName     string
	NewDescription string
}

type UpdateFeatureGroupOpt

type UpdateFeatureGroupOpt struct {
	GroupName        string
	Description      *string
	OnlineRevisionId *int32
}

type UpdateFeatureOpt

type UpdateFeatureOpt struct {
	FeatureName    string
	NewDescription string
}

Jump to

Keyboard shortcuts

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