Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPageSize = 10
DefaultPageSize is the default pagination page size when page size is not assigned
View Source
const MaxPageSize = 100
MaxPageSize is the maximum pagination page size if the assigned value is over this number
Variables ¶
View Source
var GetModelSelectedFields = []string{
`CONCAT('models/', id) as name`,
`"model"."uid"`,
`"model"."id"`,
`"model"."description"`,
`"model"."model_definition_uid"`,
`"model"."configuration"`,
`"model"."visibility"`,
`"model"."owner"`,
`"model"."state"`,
`"model"."task"`,
`"model"."create_time"`,
`"model"."update_time"`,
}
View Source
var GetModelSelectedFieldsWOConfiguration = []string{
`CONCAT('models/', id) as name`,
`"model"."uid"`,
`"model"."id"`,
`"model"."description"`,
`"model"."model_definition_uid"`,
`"model"."visibility"`,
`"model"."owner"`,
`"model"."state"`,
`"model"."task"`,
`"model"."create_time"`,
`"model"."update_time"`,
}
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { CreateModel(model datamodel.Model) error GetModelById(owner string, modelID string, view modelPB.View) (datamodel.Model, error) GetModelByUid(owner string, modelUID uuid.UUID, view modelPB.View) (datamodel.Model, error) DeleteModel(modelUID uuid.UUID) error UpdateModel(modelUID uuid.UUID, updatedModel datamodel.Model) error UpdateModelState(modelUID uuid.UUID, state datamodel.ModelState) error ListModels(owner string, view modelPB.View, pageSize int, pageToken string) (models []datamodel.Model, nextPageToken string, totalSize int64, err error) CreateTritonModel(model datamodel.TritonModel) error GetTritonModels(modelInstanceUID uuid.UUID) ([]datamodel.TritonModel, error) GetTritonEnsembleModel(modelInstanceUID uuid.UUID) (datamodel.TritonModel, error) GetModelDefinition(id string) (datamodel.ModelDefinition, error) GetModelDefinitionByUid(uid uuid.UUID) (datamodel.ModelDefinition, error) ListModelDefinitions(view modelPB.View, pageSize int, pageToken string) (definitions []datamodel.ModelDefinition, nextPageToken string, totalSize int64, err error) GetModelByIdAdmin(modelID string, view modelPB.View) (datamodel.Model, error) GetModelByUidAdmin(modelUID uuid.UUID, view modelPB.View) (datamodel.Model, error) ListModelsAdmin(view modelPB.View, pageSize int, pageToken string) (models []datamodel.Model, nextPageToken string, totalSize int64, err error) }
func NewRepository ¶
func NewRepository(db *gorm.DB) Repository
Click to show internal directories.
Click to hide internal directories.