web

package
v0.0.0-...-8150c2d Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2019 License: AGPL-3.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jobs

type Jobs []*web.Job

func (Jobs) Len

func (k Jobs) Len() int

func (Jobs) Less

func (k Jobs) Less(i, j int) bool

func (Jobs) Swap

func (k Jobs) Swap(i, j int)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	workingDir string,
	ds *data.Datastore,
	compilationServiceAddress, scoringServiceAddress, clusterProxyAddress string,
	scoringServicePortsRange [2]int,
	kerberos bool,
) *Service

func (*Service) ActivateIdentity

func (s *Service) ActivateIdentity(pz az.Principal, identityId int64) error

func (*Service) BuildModel

func (s *Service) BuildModel(pz az.Principal, clusterId int64, datasetId int64, algorithm string) (int64, error)

func (*Service) BuildModelAuto

func (s *Service) BuildModelAuto(pz az.Principal, clusterId int64, dataset, targetName string, maxRunTime int) (*web.Model, error)

func (*Service) CheckMojo

func (s *Service) CheckMojo(pz az.Principal, algo string) (bool, error)

func (*Service) CreateDataset

func (s *Service) CreateDataset(pz az.Principal, clusterId int64, datasourceId int64, name, description string, responseColumnName string) (int64, error)

func (*Service) CreateDatasource

func (s *Service) CreateDatasource(pz az.Principal, projectId int64, name, description, filePath string) (int64, error)

func (*Service) CreateIdentity

func (s *Service) CreateIdentity(pz az.Principal, name string, password string) (int64, error)

func (*Service) CreateLabel

func (s *Service) CreateLabel(pz az.Principal, projectId int64, name, description string) (int64, error)

func (*Service) CreatePackage

func (s *Service) CreatePackage(pz az.Principal, projectId int64, name string) error

func (*Service) CreateProject

func (s *Service) CreateProject(pz az.Principal, name, description, modelCategory string) (int64, error)

func (*Service) CreateRole

func (s *Service) CreateRole(pz az.Principal, name string, description string) (int64, error)

func (*Service) CreateWorkgroup

func (s *Service) CreateWorkgroup(pz az.Principal, name string, description string) (int64, error)

func (*Service) DeactivateIdentity

func (s *Service) DeactivateIdentity(pz az.Principal, identityId int64) error

func (*Service) DeleteCluster

func (s *Service) DeleteCluster(pz az.Principal, clusterId int64) error

func (*Service) DeleteDataset

func (s *Service) DeleteDataset(pz az.Principal, datasetId int64) error

func (*Service) DeleteDatasource

func (s *Service) DeleteDatasource(pz az.Principal, datasourceId int64) error

func (*Service) DeleteEngine

func (s *Service) DeleteEngine(pz az.Principal, engineId int64) error

func (*Service) DeleteLabel

func (s *Service) DeleteLabel(pz az.Principal, labelId int64) error

func (*Service) DeleteModel

func (s *Service) DeleteModel(pz az.Principal, modelId int64) error

func (*Service) DeletePackage

func (s *Service) DeletePackage(pz az.Principal, projectId int64, name string) error

func (*Service) DeletePackageDirectory

func (s *Service) DeletePackageDirectory(pz az.Principal, projectId int64, packageName string, relativePath string) error

func (*Service) DeletePackageFile

func (s *Service) DeletePackageFile(pz az.Principal, projectId int64, packageName string, relativePath string) error

func (*Service) DeleteProject

func (s *Service) DeleteProject(pz az.Principal, projectId int64) error

func (*Service) DeleteRole

func (s *Service) DeleteRole(pz az.Principal, roleId int64) error

func (*Service) DeleteService

func (s *Service) DeleteService(pz az.Principal, serviceId int64) error

func (*Service) DeleteWorkgroup

func (s *Service) DeleteWorkgroup(pz az.Principal, workgroupId int64) error

func (*Service) FindModelsBinomial

func (s *Service) FindModelsBinomial(pz az.Principal, projectId int64, namePart, sortBy string, ascending bool, offset, limit int64) ([]*web.BinomialModel, error)

func (*Service) FindModelsCount

func (s *Service) FindModelsCount(pz az.Principal, projectId int64) (int64, error)

func (*Service) FindModelsMultinomial

func (s *Service) FindModelsMultinomial(pz az.Principal, projectId int64, namePart, sortBy string, ascending bool, offset, limit int64) ([]*web.MultinomialModel, error)

func (*Service) FindModelsRegression

func (s *Service) FindModelsRegression(pz az.Principal, projectId int64, namePart, sortBy string, ascending bool, offset, limit int64) ([]*web.RegressionModel, error)

func (*Service) GetAllBinomialSortCriteria

func (s *Service) GetAllBinomialSortCriteria(pz az.Principal) ([]string, error)

TODO: hardcoded; should be determined by h2o metrics

func (*Service) GetAllClusterTypes

func (s *Service) GetAllClusterTypes(pz az.Principal) ([]*web.ClusterType, error)

func (*Service) GetAllEntityTypes

func (s *Service) GetAllEntityTypes(pz az.Principal) ([]*web.EntityType, error)

func (*Service) GetAllMultinomialSortCriteria

func (s *Service) GetAllMultinomialSortCriteria(pz az.Principal) ([]string, error)

TODO: hardcoded; should be determined by h2o metrics

func (*Service) GetAllPermissions

func (s *Service) GetAllPermissions(pz az.Principal) ([]*web.Permission, error)

func (*Service) GetAllRegressionSortCriteria

func (s *Service) GetAllRegressionSortCriteria(pz az.Principal) ([]string, error)

TODO: hardcoded; should be determined by h2o metrics

func (*Service) GetAttributesForPackage

func (s *Service) GetAttributesForPackage(pz az.Principal, projectId int64, packageName string) (string, error)

func (*Service) GetCluster

func (s *Service) GetCluster(pz az.Principal, clusterId int64) (*web.Cluster, error)

func (*Service) GetClusterOnYarn

func (s *Service) GetClusterOnYarn(pz az.Principal, clusterId int64) (*web.YarnCluster, error)

func (*Service) GetClusterStatus

func (s *Service) GetClusterStatus(pz az.Principal, cloudId int64) (*web.ClusterStatus, error)

Returns the Cloud status from H2O This method should only be called if the cluster reports a non-Stopped status If the cloud was shut down from the outside of steam, will report Unknown / status for cloud

TODO: Maybe this should only report if non-Stopped,non-Unknown status

In the case of Unknown, should only check if forced?

func (*Service) GetClusters

func (s *Service) GetClusters(pz az.Principal, offset, limit int64) ([]*web.Cluster, error)

func (*Service) GetConfig

func (s *Service) GetConfig(pz az.Principal) (*web.Config, error)

func (*Service) GetDataset

func (s *Service) GetDataset(pz az.Principal, datasetId int64) (*web.Dataset, error)

func (*Service) GetDatasets

func (s *Service) GetDatasets(pz az.Principal, datasourceId int64, offset, limit int64) ([]*web.Dataset, error)

func (*Service) GetDatasetsFromCluster

func (s *Service) GetDatasetsFromCluster(pz az.Principal, clusterId int64) ([]*web.Dataset, error)

func (*Service) GetDatasource

func (s *Service) GetDatasource(pz az.Principal, datasourceId int64) (*web.Datasource, error)

func (*Service) GetDatasources

func (s *Service) GetDatasources(pz az.Principal, projectId, offset, limit int64) ([]*web.Datasource, error)

func (*Service) GetEngine

func (s *Service) GetEngine(pz az.Principal, engineId int64) (*web.Engine, error)

func (*Service) GetEngines

func (s *Service) GetEngines(pz az.Principal) ([]*web.Engine, error)

func (*Service) GetHistory

func (s *Service) GetHistory(pz az.Principal, entityTypeId, entityId, offset, limit int64) ([]*web.EntityHistory, error)

func (*Service) GetIdentities

func (s *Service) GetIdentities(pz az.Principal, offset, limit int64) ([]*web.Identity, error)

func (*Service) GetIdentitiesForEntity

func (s *Service) GetIdentitiesForEntity(pz az.Principal, entityTypeId, entityId int64) ([]*web.UserRole, error)

func (*Service) GetIdentitiesForRole

func (s *Service) GetIdentitiesForRole(pz az.Principal, roleId int64) ([]*web.Identity, error)

func (*Service) GetIdentitiesForWorkgroup

func (s *Service) GetIdentitiesForWorkgroup(pz az.Principal, workgroupId int64) ([]*web.Identity, error)

func (*Service) GetIdentity

func (s *Service) GetIdentity(pz az.Principal, identityId int64) (*web.Identity, error)

func (*Service) GetIdentityByName

func (s *Service) GetIdentityByName(pz az.Principal, name string) (*web.Identity, error)

func (*Service) GetJob

func (s *Service) GetJob(pz az.Principal, clusterId int64, jobName string) (*web.Job, error)

FIXME where is this API used?

func (*Service) GetJobs

func (s *Service) GetJobs(pz az.Principal, clusterId int64) ([]*web.Job, error)

func (*Service) GetLabelsForProject

func (s *Service) GetLabelsForProject(pz az.Principal, projectId int64) ([]*web.Label, error)

func (*Service) GetModel

func (s *Service) GetModel(pz az.Principal, modelId int64) (*web.Model, error)

func (*Service) GetModelBinomial

func (s *Service) GetModelBinomial(pz az.Principal, modelId int64) (*web.BinomialModel, error)

func (*Service) GetModelMultinomial

func (s *Service) GetModelMultinomial(pz az.Principal, modelId int64) (*web.MultinomialModel, error)

func (*Service) GetModelRegression

func (s *Service) GetModelRegression(pz az.Principal, modelId int64) (*web.RegressionModel, error)

func (*Service) GetModels

func (s *Service) GetModels(pz az.Principal, projectId int64, offset, limit int64) ([]*web.Model, error)

func (*Service) GetModelsFromCluster

func (s *Service) GetModelsFromCluster(pz az.Principal, clusterId int64, frameKey string) ([]*web.Model, error)

func (*Service) GetPackageDirectories

func (s *Service) GetPackageDirectories(pz az.Principal, projectId int64, packageName string, relativePath string) ([]string, error)

func (*Service) GetPackageFiles

func (s *Service) GetPackageFiles(pz az.Principal, projectId int64, packageName string, relativePath string) ([]string, error)

func (*Service) GetPackages

func (s *Service) GetPackages(pz az.Principal, projectId int64) ([]string, error)

func (*Service) GetPermissionsForIdentity

func (s *Service) GetPermissionsForIdentity(pz az.Principal, identityId int64) ([]*web.Permission, error)

func (*Service) GetPermissionsForRole

func (s *Service) GetPermissionsForRole(pz az.Principal, roleId int64) ([]*web.Permission, error)

func (*Service) GetPrivileges

func (s *Service) GetPrivileges(pz az.Principal, entityTypeId, entityId int64) ([]*web.EntityPrivilege, error)

func (*Service) GetProject

func (s *Service) GetProject(pz az.Principal, projectId int64) (*web.Project, error)

func (*Service) GetProjects

func (s *Service) GetProjects(pz az.Principal, offset, limit int64) ([]*web.Project, error)

func (*Service) GetRole

func (s *Service) GetRole(pz az.Principal, roleId int64) (*web.Role, error)

func (*Service) GetRoleByName

func (s *Service) GetRoleByName(pz az.Principal, name string) (*web.Role, error)

func (*Service) GetRoles

func (s *Service) GetRoles(pz az.Principal, offset, limit int64) ([]*web.Role, error)

func (*Service) GetRolesForIdentity

func (s *Service) GetRolesForIdentity(pz az.Principal, identityId int64) ([]*web.Role, error)

func (*Service) GetService

func (s *Service) GetService(pz az.Principal, serviceId int64) (*web.ScoringService, error)

func (*Service) GetServices

func (s *Service) GetServices(pz az.Principal, offset, limit int64) ([]*web.ScoringService, error)

func (*Service) GetServicesForModel

func (s *Service) GetServicesForModel(pz az.Principal, modelId, offset, limit int64) ([]*web.ScoringService, error)

func (*Service) GetServicesForProject

func (s *Service) GetServicesForProject(pz az.Principal, projectId, offset, limit int64) ([]*web.ScoringService, error)

func (*Service) GetWorkgroup

func (s *Service) GetWorkgroup(pz az.Principal, workgroupId int64) (*web.Workgroup, error)

func (*Service) GetWorkgroupByName

func (s *Service) GetWorkgroupByName(pz az.Principal, name string) (*web.Workgroup, error)

func (*Service) GetWorkgroups

func (s *Service) GetWorkgroups(pz az.Principal, offset, limit int64) ([]*web.Workgroup, error)

func (*Service) GetWorkgroupsForIdentity

func (s *Service) GetWorkgroupsForIdentity(pz az.Principal, identityId int64) ([]*web.Workgroup, error)

func (*Service) ImportModelFromCluster

func (s *Service) ImportModelFromCluster(pz az.Principal, clusterId, projectId int64, modelKey, modelName string) (int64, error)

func (*Service) ImportModelMojo

func (s *Service) ImportModelMojo(pz az.Principal, modelId int64) error

func (*Service) ImportModelPojo

func (s *Service) ImportModelPojo(pz az.Principal, modelId int64) error

func (*Service) LinkIdentityWithRole

func (s *Service) LinkIdentityWithRole(pz az.Principal, identityId int64, roleId int64) error

func (*Service) LinkIdentityWithWorkgroup

func (s *Service) LinkIdentityWithWorkgroup(pz az.Principal, identityId int64, workgroupId int64) error

func (*Service) LinkLabelWithModel

func (s *Service) LinkLabelWithModel(pz az.Principal, labelId, modelId int64) error

func (*Service) LinkRoleWithPermission

func (s *Service) LinkRoleWithPermission(pz az.Principal, roleId int64, permissionId int64) error

func (*Service) LinkRoleWithPermissions

func (s *Service) LinkRoleWithPermissions(pz az.Principal, roleId int64, permissionIds []int64) error

func (*Service) PingServer

func (s *Service) PingServer(pz az.Principal, status string) (string, error)

func (*Service) RegisterCluster

func (s *Service) RegisterCluster(pz az.Principal, address string) (int64, error)

func (*Service) SetAttributesForPackage

func (s *Service) SetAttributesForPackage(pz az.Principal, projectId int64, packageName string, attributes string) error

func (*Service) ShareEntity

func (s *Service) ShareEntity(pz az.Principal, kind string, workgroupId, entityTypeId, entityId int64) error

func (*Service) SplitDataset

func (s *Service) SplitDataset(pz az.Principal, datasetId int64, ratio1 int, ratio2 int) ([]int64, error)

func (*Service) StartClusterOnYarn

func (s *Service) StartClusterOnYarn(pz az.Principal, clusterName string, engineId int64, size int, memory, keytab string) (int64, error)

func (*Service) StartService

func (s *Service) StartService(pz az.Principal, modelId int64, name, packageName string) (int64, error)

func (*Service) StopClusterOnYarn

func (s *Service) StopClusterOnYarn(pz az.Principal, clusterId int64, keytab string) error

func (*Service) StopService

func (s *Service) StopService(pz az.Principal, serviceId int64) error

func (*Service) UnlinkIdentityFromRole

func (s *Service) UnlinkIdentityFromRole(pz az.Principal, identityId int64, roleId int64) error

func (*Service) UnlinkIdentityFromWorkgroup

func (s *Service) UnlinkIdentityFromWorkgroup(pz az.Principal, identityId int64, workgroupId int64) error

func (*Service) UnlinkLabelFromModel

func (s *Service) UnlinkLabelFromModel(pz az.Principal, labelId, modelId int64) error

func (*Service) UnlinkRoleFromPermission

func (s *Service) UnlinkRoleFromPermission(pz az.Principal, roleId int64, permissionId int64) error

func (*Service) UnregisterCluster

func (s *Service) UnregisterCluster(pz az.Principal, clusterId int64) error

func (*Service) UnshareEntity

func (s *Service) UnshareEntity(pz az.Principal, kind string, workgroupId, entityTypeId, entityId int64) error

func (*Service) UpdateDataset

func (s *Service) UpdateDataset(pz az.Principal, datasetId int64, name, description, responseColumnName string) error

func (*Service) UpdateDatasource

func (s *Service) UpdateDatasource(pz az.Principal, datasourceId int64, name, description, filePath string) error

func (*Service) UpdateIdentity

func (s *Service) UpdateIdentity(pz az.Principal, identityId int64, password string) error

func (*Service) UpdateLabel

func (s *Service) UpdateLabel(pz az.Principal, labelId int64, name, description string) error

func (*Service) UpdateRole

func (s *Service) UpdateRole(pz az.Principal, roleId int64, name string, description string) error

func (*Service) UpdateWorkgroup

func (s *Service) UpdateWorkgroup(pz az.Principal, workgroupId int64, name string, description string) error

Jump to

Keyboard shortcuts

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