api

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	*paifeaturestore.Client

	FsProjectApi *FsProjectApiService

	InstanceApi *InstanceApiService

	DatasourceApi *DatasourceApiService

	FeatureEntityApi *FeatureEntityApiService

	FeatureViewApi *FeatureViewApiService

	FsModelApi *FsModelApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Pairec Experiment Restful Api API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) (*APIClient, error)

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

type Ak

type Ak struct {
	AccesskeyId     string `json:"accesskey_id"`
	AccesskeySecret string `json:"accesskey_secret"`
}

type Configuration

type Configuration struct {
	AccessKeyId     string
	AccessKeySecret string
	ProjectName     string
	UserAgent       string
	// contains filtered or unexported fields
}

func NewConfiguration

func NewConfiguration(regionId, accessKeyId, accessKeySecret, projectName string) *Configuration

func (*Configuration) GetDomain

func (c *Configuration) GetDomain() string

func (*Configuration) SetDomain

func (c *Configuration) SetDomain(domain string)

type Datasource

type Datasource struct {
	DatasourceId  int    `json:"datasource_id,omitempty"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	Region        string `json:"region,omitempty"`
	WorkspaceId   string `json:"workspace_id"`
	VpcAddress    string `json:"vpc_address,omitempty"`
	PublicAddress string `json:"public_address,omitempty"`
	Project       string `json:"project,omitempty"`
	Database      string `json:"database,omitempty"`
	Token         string `json:"token,omitempty"`
	Pwd           string `json:"pwd,omitempty"`
	User          string `json:"user,omitempty"`
	RdsInstanceId string `json:"rds_instance_id,omitempty"`

	Ak Ak `json:"-"`

	TestMode bool `json:"-"`
}

func (*Datasource) GenerateDSN

func (d *Datasource) GenerateDSN(datasourceType string) (DSN string)

func (*Datasource) NewTableStoreClient added in v2.0.5

func (d *Datasource) NewTableStoreClient() (client *tablestore.TableStoreClient)

type DatasourceApiService

type DatasourceApiService service

func (*DatasourceApiService) DatasourceDatasourceIdGet

func (a *DatasourceApiService) DatasourceDatasourceIdGet(datasourceId int) (GetDatasourceResponse, error)

DatasourceApiService Get datasource By datasource_id

  • @param datasourceId

@return GetDatasourceResponse

func (*DatasourceApiService) GetFeatureDBDatasourceInfo added in v2.0.7

func (a *DatasourceApiService) GetFeatureDBDatasourceInfo(isTestMode bool, workspaceId string) (string, string, error)

type FeatureEntity

type FeatureEntity struct {
	FeatureEntityId     int    `json:"feature_entity_id,omitempty"`
	ProjectId           int    `json:"project_id"`
	ProjectName         string `json:"project_name,omitempty"`
	FeatureEntityName   string `json:"feature_entity_name"`
	FeatureEntityJoinid string `json:"feature_entity_joinid"`
}

type FeatureEntityApiService

type FeatureEntityApiService service

func (*FeatureEntityApiService) ListFeatureEntities

func (a *FeatureEntityApiService) ListFeatureEntities(projectId string) (ListFeatureEntitiesResponse, error)

FeatureEntityApiService List FeatureEntities

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return InlineResponse20079

type FeatureView

type FeatureView struct {
	FeatureViewId        int                  `json:"feature_view_id"`
	ProjectId            int                  `json:"project_id"`
	ProjectName          string               `json:"project_name,omitempty"`
	Name                 string               `json:"name,omitempty"`
	FeatureEntityId      int                  `json:"feature_entity_id,omitempty"`
	FeatureEntityName    string               `json:"feature_entity_name,omitempty"`
	Owner                string               `json:"owner"`
	Type                 string               `json:"type"`
	Online               bool                 `json:"online"`
	IsRegister           bool                 `json:"is_register"`
	RegisterTable        string               `json:"register_table"`
	RegisterDatasourceId int                  `json:"register_datasource_id"`
	Ttl                  int                  `json:"ttl"`
	Tags                 []string             `json:"tags"`
	Config               string               `json:"config"`
	LasySyncConfig       string               `json:"last_sync_config"`
	Fields               []*FeatureViewFields `json:"fields"`
	RegisterDataSource   *Datasource          `json:"register_datasource,omitempty"`
	WriteToFeatureDB     bool                 `json:"write_to_featuredb"`
}

type FeatureViewApiService

type FeatureViewApiService service

func (*FeatureViewApiService) GetFeatureViewByID

func (a *FeatureViewApiService) GetFeatureViewByID(featureViewId string) (GetFeatureViewResponse, error)

FeatureViewApiService Get FeatureView By ID

  • @param featureViewId

@return GetFeatureViewResponse

func (*FeatureViewApiService) ListFeatureViews

func (a *FeatureViewApiService) ListFeatureViews(pagesize, pagenumber int32, projectId string) (ListFeatureViewsResponse, error)

type FeatureViewFields

type FeatureViewFields struct {
	Name         string `json:"name,omitempty"`
	Type         int32  `json:"type,omitempty"`
	IsPartition  bool   `json:"is_partition,omitempty"`
	IsPrimaryKey bool   `json:"is_primary_key,omitempty"`
	IsEventTime  bool   `json:"is_event_time,omitempty"`
	Position     int    `json:"position,omitempty"`
}

type FeatureViewSeqConfig added in v2.0.5

type FeatureViewSeqConfig struct {
	ItemIdField                   string       `json:"item_id_field"`
	EventField                    string       `json:"event_field"`
	TimestampField                string       `json:"timestamp_field"`
	PlayTimeField                 string       `json:"play_time_field,omitempty"`
	PlayTimeFilter                string       `json:"play_time_filter,omitempty"`
	DeduplicationMethod           []string     `json:"deduplication_method"`
	DeduplicationMethodNum        int          `json:"-"`
	OfflineSeqTableName           string       `json:"offline_seq_table_name"`
	OfflineSeqTablePkField        string       `json:"offline_seq_table_pk_field"`
	OfflineSeqTableEventTimeField string       `json:"offline_seq_table_event_time_field"`
	OfflineSeqTablePartitionField string       `json:"offline_seq_table_partition_field"`
	SeqLenOnline                  int          `json:"seq_len_online"`
	SeqConfig                     []*SeqConfig `json:"seq_config"`
}

type FsModelApiListModelsOpts

type FsModelApiListModelsOpts struct {
	Pagesize   optional.Int32
	Pagenumber optional.Int32
	ProjectId  optional.Int32
}

type FsModelApiService

type FsModelApiService service

func (*FsModelApiService) GetModelByID

func (a *FsModelApiService) GetModelByID(modelId string) (GetModelResponse, error)

FsModelApiService Get Model By ID

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param modelId

@return InlineResponse20086

func (*FsModelApiService) ListModels

func (a *FsModelApiService) ListModels(pagesize, pagenumber int, projectId string) (ListModelsResponse, error)

type FsProjectApiService

type FsProjectApiService service

func (*FsProjectApiService) ListProjects

func (a *FsProjectApiService) ListProjects() (ListProjectsResponse, error)

FsProjectApiService List Projects

@return ListProjectsResponse

type GetDatasourceResponse

type GetDatasourceResponse struct {
	Datasource *Datasource `json:"data,omitempty"`
}

type GetFeatureEntityResponse

type GetFeatureEntityResponse struct {
	FeatureEntity *FeatureEntity
}

type GetFeatureViewResponse

type GetFeatureViewResponse struct {
	FeatureView *FeatureView
}

type GetModelResponse

type GetModelResponse struct {
	Model *Model `json:"model,omitempty"`
}

type InstanceApiService

type InstanceApiService service

func (*InstanceApiService) GetInstance

func (a *InstanceApiService) GetInstance() error

type ListFeatureEntitiesResponse

type ListFeatureEntitiesResponse struct {
	FeatureEntities []*FeatureEntity
}

type ListFeatureViewsResponse

type ListFeatureViewsResponse struct {
	TotalCount   int            `json:"total_count"`
	FeatureViews []*FeatureView `json:"feature_views"`
}

type ListModelsResponse

type ListModelsResponse struct {
	TotalCount int      `json:"total_count,omitempty"`
	Models     []*Model `json:"models,omitempty"`
}

type ListProjectsResponse

type ListProjectsResponse struct {
	Projects []*Project `json:"data,omitempty"`
}

type Model

type Model struct {
	ModelId              int              `json:"model_id"`
	ProjectId            int              `json:"project_id"`
	ProjectName          string           `json:"project_name,omitempty"`
	Name                 string           `json:"name"`
	Owner                string           `json:"owner"`
	LabelDatasourceId    int              `json:"label_datasource_id,omitempty"`
	LabelDatasourceTable string           `json:"label_datasource_table"`
	LabelEventTime       string           `json:"label_event_time"`
	TrainningSetTable    string           `json:"trainning_set_table"`
	Features             []*ModelFeatures `json:"features"`
}

type ModelFeatures

type ModelFeatures struct {
	FeatureViewId   int    `json:"feature_view_id,omitempty"`
	FeatureViewName string `json:"feature_view_name,omitempty"`
	Name            string `json:"name,omitempty"`
	AliasName       string `json:"alias_name,omitempty"`
	Type            int32  `json:"type,omitempty"`
	TypeStr         string `json:"type_str,omitempty"`
}

type Project

type Project struct {
	ProjectId             int    `json:"project_id,omitempty"`
	ProjectName           string `json:"project_name"`
	Description           string `json:"description"`
	OfflineDatasourceType string `json:"offline_datasource_type"`
	OfflineDatasourceId   int    `json:"offline_datasource_id"`
	OnlineDatasourceType  string `json:"online_datasource_type"`
	OnlineDatasourceId    int    `json:"online_datasource_id"`
	OfflineLifecycle      int32  `json:"offline_lifecycle"`
	FeatureEntityCount    int32  `json:"feature_entity_count,omitempty"`
	FeatureViewCount      int32  `json:"feature_view_count,omitempty"`
	ModelCount            int32  `json:"model_count,omitempty"`

	OfflineDataSource *Datasource `json:"offline_datasource,omitempty"`
	OnlineDataSource  *Datasource `json:"online_datasource,omitempty"`

	InstanceId       string `json:"instance_id,omitempty"`
	Signature        string `json:"-"`
	FeatureDBAddress string `json:"-"`
	FeatureDBToken   string `json:"-"`
}

type SeqConfig added in v2.0.5

type SeqConfig struct {
	OfflineSeqName string `json:"offline_seq_name"`
	SeqEvent       string `json:"seq_event"`
	SeqLen         int    `json:"seq_len"`
	OnlineSeqName  string `json:"online_seq_name"`
}

Jump to

Keyboard shortcuts

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