28 lines
529 B
Go
28 lines
529 B
Go
package algorithm
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type IAlgorithm interface {
|
|
All(ctx context.Context) (Algorithms, error)
|
|
Train(ctx context.Context) (Algorithms, error)
|
|
Infer(ctx context.Context) (Algorithms, error)
|
|
Create(ctx context.Context, param *CreateParam) (*CreateResp, error)
|
|
Features() *Features
|
|
}
|
|
|
|
type ISpec interface {
|
|
Spec() (*Algorithm, error)
|
|
Detail() (interface{}, error)
|
|
Features() *FeatureSpec
|
|
}
|
|
|
|
type TrainParameter interface {
|
|
AlgorithmParam()
|
|
}
|
|
|
|
type CreateParameter interface {
|
|
AlgorithmCreateParam()
|
|
}
|