data

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: 11 Imported by: 0

README

Development Notes

Install postgresql

Install using brew:

brew update
brew install postgres

Install pgAdmin (optional)

Download and install from here: https://www.pgadmin.org/download/macosx.php

Configuration

Edit /usr/local/var/postgres/postgresql.conf and turn on verbose logging:

log_statement = 'all'     # none, ddl, mod, all

Start postgresql

For development:

postgres -D /usr/local/var/postgres

OR

To have launchd start postgresql at login:

ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Create application user

createuser -P steam

Create steam database

psql -U su_name postgres -a -f create-database.sql

(On OSX, su_name will be your OSX username)

Drop steam database

psql -U su_name postgres -a -f drop-database.sql

Documentation

Index

Constants

View Source
const (
	View = 1 << iota
	Edit // 2
	Own  // 4
)
View Source
const (
	Version = "1.1.0"

	SuperuserRoleName = "Superuser"

	CanView = "view"
	CanEdit = "edit"
	Owns    = "own"

	ForIdentity  = "identity"
	ForWorkgroup = "workgroup"

	RoleEntity       = "role"
	WorkgroupEntity  = "workgroup"
	IdentityEntity   = "identity"
	EngineEntity     = "engine"
	ClusterEntity    = "cluster"
	ProjectEntity    = "project"
	DatasourceEntity = "datasource"
	DatasetEntity    = "dataset"
	ModelEntity      = "model"
	LabelEntity      = "label"
	ServiceEntity    = "service"

	ClusterExternal = "external"
	ClusterYarn     = "yarn"
)
View Source
const (
	IdleState         = "idle"
	StartingState     = "starting"
	StartedState      = "started"
	SuspendingState   = "suspending"
	SuspendedState    = "suspended"
	StoppingState     = "stopping"
	StoppedState      = "stopped"
	BlockedState      = "blocked"
	DisconnectedState = "disconnected"
	FailedState       = "failed"
	CompletedState    = "completed"
)
View Source
const (
	ManageRole       = "ManageRole"
	ViewRole         = "ViewRole"
	ManageWorkgroup  = "ManageWorkgroup"
	ViewWorkgroup    = "ViewWorkgroup"
	ManageIdentity   = "ManageIdentity"
	ViewIdentity     = "ViewIdentity"
	ManageEngine     = "ManageEngine"
	ViewEngine       = "ViewEngine"
	ManageCluster    = "ManageCluster"
	ViewCluster      = "ViewCluster"
	ManageProject    = "ManageProject"
	ViewProject      = "ViewProject"
	ManageDatasource = "ManageDatasource"
	ViewDatasource   = "ViewDatasource"
	ManageDataset    = "ManageDataset"
	ViewDataset      = "ViewDataset"
	ManageModel      = "ManageModel"
	ViewModel        = "ViewModel"
	ManageLabel      = "ManageLabel"
	ViewLabel        = "ViewLabel"
	ManageService    = "ManageService"
	ViewService      = "ViewService"
)
View Source
const (
	CreateOp  string = "create"
	UpdateOp  string = "update"
	DeleteOp  string = "delete"
	EnableOp  string = "enable"
	DisableOp string = "disable"
	ShareOp   string = "share"
	UnshareOp string = "unshare"
	LinkOp    string = "link"
	UnlinkOp  string = "unlink"
)

Variables

View Source
var (
	Privileges   map[string]int
	Permissions  []Permission
	EntityTypes  []EntityType
	ClusterTypes []ClusterType
)

Functions

func Destroy

func Destroy(dbPath string) error

Types

type BinomialModel

type BinomialModel struct {
	Id                  int64
	ProjectId           int64
	TrainingDatasetId   int64
	ValidationDatasetId sql.NullInt64
	Name                string
	ClusterId           int64
	ClusterName         string
	ModelKey            string
	Algorithm           string
	ModelCategory       string
	DatasetName         string
	ResponseColumnName  string
	LogicalName         sql.NullString
	Location            string
	ModelObjectType     sql.NullString
	MaxRunTime          int64
	Metrics             string
	MetricsVersion      string
	Created             time.Time
	LabelId             sql.NullInt64
	LabelName           sql.NullString
	Mse                 float64
	RSquared            float64
	Logloss             float64
	Auc                 float64
	Gini                float64
}

func ScanBinomialModel

func ScanBinomialModel(r *sql.Row) (BinomialModel, error)

func ScanBinomialModels

func ScanBinomialModels(rs *sql.Rows) ([]BinomialModel, error)

type Cluster

type Cluster struct {
	Id       int64
	Name     string
	TypeId   int64
	DetailId int64
	Address  string
	State    string
	Created  time.Time
}

func ScanCluster

func ScanCluster(r *sql.Row) (Cluster, error)

func ScanClusters

func ScanClusters(rs *sql.Rows) ([]Cluster, error)

type ClusterType

type ClusterType struct {
	Id   int64
	Name string
}

func ScanClusterType

func ScanClusterType(r *sql.Row) (ClusterType, error)

func ScanClusterTypes

func ScanClusterTypes(rs *sql.Rows) ([]ClusterType, error)

type ClusterTypeKeys

type ClusterTypeKeys struct {
	External int64
	Yarn     int64
}

type Connection

type Connection struct {
	DbName            string
	User              string
	Password          string
	Host              string
	Port              string
	ConnectionTimeout string
	SSLMode           string
	SSLCert           string
	SSLKey            string
	SSLRootCert       string
}

type Dataset

type Dataset struct {
	Id                 int64
	DatasourceId       int64
	Name               string
	Description        string
	FrameName          string
	ResponseColumnName string
	Properties         string
	PropertiesVersion  string
	Created            time.Time
}

func ScanDataset

func ScanDataset(r *sql.Row) (Dataset, error)

func ScanDatasets

func ScanDatasets(rs *sql.Rows) ([]Dataset, error)

type Datasource

type Datasource struct {
	Id            int64
	ProjectId     int64
	Name          string
	Description   string
	Kind          string
	Configuration string
	Created       time.Time
}

func ScanDatasource

func ScanDatasource(r *sql.Row) (Datasource, error)

func ScanDatasources

func ScanDatasources(rs *sql.Rows) ([]Datasource, error)

type Datastore

type Datastore struct {
	Permissions *PermissionKeys

	EntityTypes *EntityTypeKeys

	ClusterTypes      *ClusterTypeKeys
	ViewPermissions   map[int64]int64
	ManagePermissions map[int64]int64
	// contains filtered or unexported fields
}

func Create

func Create(dbPath, suname, supass string) (*Datastore, error)

func (*Datastore) ActivateIdentity

func (ds *Datastore) ActivateIdentity(pz az.Principal, identityId int64) error

func (*Datastore) CountModelsForProject

func (ds *Datastore) CountModelsForProject(pz az.Principal, projectId int64) (int64, error)

func (*Datastore) CreateBinomialModel

func (ds *Datastore) CreateBinomialModel(pz az.Principal, modelId int64, mse, rSquared, logloss, auc, gini float64) error

func (*Datastore) CreateDataset

func (ds *Datastore) CreateDataset(pz az.Principal, dataset Dataset) (int64, error)

func (*Datastore) CreateDatasource

func (ds *Datastore) CreateDatasource(pz az.Principal, datasource Datasource) (int64, error)

--- Datasource ---

func (*Datastore) CreateEngine

func (ds *Datastore) CreateEngine(pz az.Principal, name, location string) (int64, error)

func (*Datastore) CreateExternalCluster

func (ds *Datastore) CreateExternalCluster(pz az.Principal, name, address, state string) (int64, error)

func (*Datastore) CreateIdentity

func (ds *Datastore) CreateIdentity(pz az.Principal, name, password string) (int64, int64, error)

func (*Datastore) CreateLabel

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

func (*Datastore) CreateModel

func (ds *Datastore) CreateModel(pz az.Principal, model Model) (int64, error)

func (*Datastore) CreateMultinomialModel

func (ds *Datastore) CreateMultinomialModel(pz az.Principal, modelId int64, mse, rSquared, logloss float64) error

func (*Datastore) CreatePrivilege

func (ds *Datastore) CreatePrivilege(pz az.Principal, privilege Privilege) error

func (*Datastore) CreateProject

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

func (*Datastore) CreateRegressionModel

func (ds *Datastore) CreateRegressionModel(pz az.Principal, modelId int64, mse, rSquared, deviance float64) error

func (*Datastore) CreateRole

func (ds *Datastore) CreateRole(pz az.Principal, name, description string) (int64, error)

func (*Datastore) CreateService

func (ds *Datastore) CreateService(pz az.Principal, service Service) (int64, error)

func (*Datastore) CreateSuperuser

func (ds *Datastore) CreateSuperuser(name, password string) (int64, int64, error)

func (*Datastore) CreateWorkgroup

func (ds *Datastore) CreateWorkgroup(pz az.Principal, name, description string) (int64, error)

func (*Datastore) CreateYarnCluster

func (ds *Datastore) CreateYarnCluster(pz az.Principal, name, address, state string, cluster YarnCluster) (int64, error)

func (*Datastore) DeactivateIdentity

func (ds *Datastore) DeactivateIdentity(pz az.Principal, identityId int64) error

func (*Datastore) DeleteCluster

func (ds *Datastore) DeleteCluster(pz az.Principal, clusterId int64) error

func (*Datastore) DeleteDataset

func (ds *Datastore) DeleteDataset(pz az.Principal, datasetId int64) error

func (*Datastore) DeleteDatasource

func (ds *Datastore) DeleteDatasource(pz az.Principal, datasourceId int64) error

func (*Datastore) DeleteEngine

func (ds *Datastore) DeleteEngine(pz az.Principal, engineId int64) error

func (*Datastore) DeleteLabel

func (ds *Datastore) DeleteLabel(pz az.Principal, labelId int64) error

func (*Datastore) DeleteModel

func (ds *Datastore) DeleteModel(pz az.Principal, modelId int64) error

func (*Datastore) DeletePrivilege

func (ds *Datastore) DeletePrivilege(pz az.Principal, privilege Privilege) error

func (*Datastore) DeleteProject

func (ds *Datastore) DeleteProject(pz az.Principal, projectId int64) error

func (*Datastore) DeleteRole

func (ds *Datastore) DeleteRole(pz az.Principal, roleId int64) error

func (*Datastore) DeleteService

func (ds *Datastore) DeleteService(pz az.Principal, serviceId int64) error

func (*Datastore) DeleteWorkgroup

func (ds *Datastore) DeleteWorkgroup(pz az.Principal, workgroupId int64) error

func (*Datastore) LinkIdentityAndRole

func (ds *Datastore) LinkIdentityAndRole(pz az.Principal, identityId, roleId int64) error

func (*Datastore) LinkIdentityAndWorkgroup

func (ds *Datastore) LinkIdentityAndWorkgroup(pz az.Principal, identityId, workgroupId int64) error

func (*Datastore) LinkLabelWithModel

func (ds *Datastore) LinkLabelWithModel(pz az.Principal, labelId, modelId int64) error

func (*Datastore) LinkRoleAndPermissions

func (ds *Datastore) LinkRoleAndPermissions(pz az.Principal, roleId int64, permissionIds []int64) error

func (*Datastore) LinkRoleWithPermission

func (ds *Datastore) LinkRoleWithPermission(pz az.Principal, roleId int64, permissionId int64) error

func (*Datastore) Lookup

func (ds *Datastore) Lookup(name string) (az.Principal, error)

func (*Datastore) ReadAllPermissions

func (ds *Datastore) ReadAllPermissions(pz az.Principal) ([]Permission, error)

func (*Datastore) ReadBinomialModel

func (ds *Datastore) ReadBinomialModel(pz az.Principal, modelId int64) (BinomialModel, error)

func (*Datastore) ReadBinomialModels

func (ds *Datastore) ReadBinomialModels(pz az.Principal, projectId int64, namePart, sortBy string, ascending bool, offset, limit int64) ([]BinomialModel, error)

func (*Datastore) ReadCluster

func (ds *Datastore) ReadCluster(pz az.Principal, clusterId int64) (Cluster, error)

func (*Datastore) ReadClusterByAddress

func (ds *Datastore) ReadClusterByAddress(pz az.Principal, address string) (Cluster, bool, error)

func (*Datastore) ReadClusterByName

func (ds *Datastore) ReadClusterByName(pz az.Principal, name string) (Cluster, bool, error)

func (*Datastore) ReadClusterTypes

func (ds *Datastore) ReadClusterTypes(pz az.Principal) []ClusterType

func (*Datastore) ReadClusters

func (ds *Datastore) ReadClusters(pz az.Principal, offset, limit int64) ([]Cluster, error)

func (*Datastore) ReadDataset

func (ds *Datastore) ReadDataset(pz az.Principal, datasetId int64) (Dataset, error)

func (*Datastore) ReadDatasetByDatasource

func (ds *Datastore) ReadDatasetByDatasource(pz az.Principal, datasourceId int64) (Dataset, bool, error)

func (*Datastore) ReadDatasets

func (ds *Datastore) ReadDatasets(pz az.Principal, datasourceId, offset, limit int64) ([]Dataset, error)

func (*Datastore) ReadDatasource

func (ds *Datastore) ReadDatasource(pz az.Principal, datasourceId int64) (Datasource, error)

func (*Datastore) ReadDatasourceByProject

func (ds *Datastore) ReadDatasourceByProject(pz az.Principal, projectId int64) (Datasource, bool, error)

func (*Datastore) ReadDatasources

func (ds *Datastore) ReadDatasources(pz az.Principal, projectId, offset, limit int64) ([]Datasource, error)

func (*Datastore) ReadEngine

func (ds *Datastore) ReadEngine(pz az.Principal, engineId int64) (Engine, error)

func (*Datastore) ReadEngines

func (ds *Datastore) ReadEngines(pz az.Principal) ([]Engine, error)

func (*Datastore) ReadEntityPrivileges

func (ds *Datastore) ReadEntityPrivileges(pz az.Principal, entityTypeId, entityId int64) ([]EntityPrivilege, error)

func (*Datastore) ReadEntityTypes

func (ds *Datastore) ReadEntityTypes(pz az.Principal) []EntityType

func (*Datastore) ReadHistoryForEntity

func (ds *Datastore) ReadHistoryForEntity(pz az.Principal, entityTypeId, entityId, offset, limit int64) ([]EntityHistory, error)

func (*Datastore) ReadIdentities

func (ds *Datastore) ReadIdentities(pz az.Principal, offset, limit int64) ([]Identity, error)

func (*Datastore) ReadIdentitiesForRole

func (ds *Datastore) ReadIdentitiesForRole(pz az.Principal, roleId int64) ([]Identity, error)

func (*Datastore) ReadIdentitiesForWorkgroup

func (ds *Datastore) ReadIdentitiesForWorkgroup(pz az.Principal, workgroupId int64) ([]Identity, error)

func (*Datastore) ReadIdentity

func (ds *Datastore) ReadIdentity(pz az.Principal, identityId int64) (Identity, error)

func (*Datastore) ReadIdentityByName

func (ds *Datastore) ReadIdentityByName(pz az.Principal, name string) (Identity, error)

func (*Datastore) ReadLabel

func (ds *Datastore) ReadLabel(pz az.Principal, labelId int64) (Label, error)

func (*Datastore) ReadLabelByModel

func (ds *Datastore) ReadLabelByModel(pz az.Principal, modelId int64) (Label, bool, error)

func (*Datastore) ReadLabelsForProject

func (ds *Datastore) ReadLabelsForProject(pz az.Principal, projectId int64) ([]Label, error)

func (*Datastore) ReadModel

func (ds *Datastore) ReadModel(pz az.Principal, modelId int64) (Model, error)

func (*Datastore) ReadModelByDataset

func (ds *Datastore) ReadModelByDataset(pz az.Principal, datasetId int64) (Model, bool, error)

func (*Datastore) ReadModels

func (ds *Datastore) ReadModels(pz az.Principal, offset, limit int64) ([]Model, error)

TODO: Deprecate

func (*Datastore) ReadModelsForProject

func (ds *Datastore) ReadModelsForProject(pz az.Principal, projectId, offset, limit int64) ([]Model, bool, error)

func (*Datastore) ReadMultinomialModel

func (ds *Datastore) ReadMultinomialModel(pz az.Principal, modelId int64) (MultinomialModel, error)

func (*Datastore) ReadMultinomialModels

func (ds *Datastore) ReadMultinomialModels(pz az.Principal, projectId int64, namePart, sortBy string, ascending bool, offset, limit int64) ([]MultinomialModel, error)

func (*Datastore) ReadPermissionsForIdentity

func (ds *Datastore) ReadPermissionsForIdentity(pz az.Principal, identityId int64) ([]Permission, error)

func (*Datastore) ReadPermissionsForRole

func (ds *Datastore) ReadPermissionsForRole(pz az.Principal, roleId int64) ([]Permission, error)

func (*Datastore) ReadProject

func (ds *Datastore) ReadProject(pz az.Principal, projectId int64) (Project, error)

func (*Datastore) ReadProjects

func (ds *Datastore) ReadProjects(pz az.Principal, offset, limit int64) ([]Project, error)

func (*Datastore) ReadRegressionModel

func (ds *Datastore) ReadRegressionModel(pz az.Principal, modelId int64) (RegressionModel, error)

func (*Datastore) ReadRegressionModels

func (ds *Datastore) ReadRegressionModels(pz az.Principal, projectId int64, namePart, sortBy string, ascending bool, offset, limit int64) ([]RegressionModel, error)

func (*Datastore) ReadRole

func (ds *Datastore) ReadRole(pz az.Principal, roleId int64) (Role, error)

func (*Datastore) ReadRoleByName

func (ds *Datastore) ReadRoleByName(pz az.Principal, name string) (Role, error)

func (*Datastore) ReadRoles

func (ds *Datastore) ReadRoles(pz az.Principal, offset, limit int64) ([]Role, error)

func (*Datastore) ReadRolesForIdentity

func (ds *Datastore) ReadRolesForIdentity(pz az.Principal, identityId int64) ([]Role, error)

func (*Datastore) ReadService

func (ds *Datastore) ReadService(pz az.Principal, serviceId int64) (Service, error)

func (*Datastore) ReadServices

func (ds *Datastore) ReadServices(pz az.Principal, offset, limit int64) ([]Service, error)

func (*Datastore) ReadServicesForModelId

func (ds *Datastore) ReadServicesForModelId(pz az.Principal, modelId int64) ([]Service, error)

func (*Datastore) ReadServicesForProjectId

func (ds *Datastore) ReadServicesForProjectId(pz az.Principal, projectId, offset, limit int64) ([]Service, error)

func (*Datastore) ReadUsersForEntity

func (ds *Datastore) ReadUsersForEntity(pz az.Principal, entityTypeId, entityId int64) ([]IdentityAndRole, error)

func (*Datastore) ReadWorkgroup

func (ds *Datastore) ReadWorkgroup(pz az.Principal, workgroupId int64) (Workgroup, error)

func (*Datastore) ReadWorkgroupByName

func (ds *Datastore) ReadWorkgroupByName(pz az.Principal, name string) (Workgroup, error)

func (*Datastore) ReadWorkgroups

func (ds *Datastore) ReadWorkgroups(pz az.Principal, offset, limit int64) ([]Workgroup, error)

func (*Datastore) ReadWorkgroupsForIdentity

func (ds *Datastore) ReadWorkgroupsForIdentity(pz az.Principal, identityId int64) ([]Workgroup, error)

func (*Datastore) ReadYarnCluster

func (ds *Datastore) ReadYarnCluster(pz az.Principal, clusterId int64) (YarnCluster, error)

func (*Datastore) UnlinkIdentityAndRole

func (ds *Datastore) UnlinkIdentityAndRole(pz az.Principal, identityId, roleId int64) error

func (*Datastore) UnlinkIdentityAndWorkgroup

func (ds *Datastore) UnlinkIdentityAndWorkgroup(pz az.Principal, identityId, workgroupId int64) error

func (*Datastore) UnlinkLabelFromModel

func (ds *Datastore) UnlinkLabelFromModel(pz az.Principal, labelId, modelId int64) error

func (*Datastore) UnlinkRoleFromPermission

func (ds *Datastore) UnlinkRoleFromPermission(pz az.Principal, roleId int64, permissionId int64) error

func (*Datastore) UpdateClusterState

func (ds *Datastore) UpdateClusterState(pz az.Principal, clusterId int64, state string) error

func (*Datastore) UpdateDataset

func (ds *Datastore) UpdateDataset(pz az.Principal, datasetId int64, dataset Dataset) error

func (*Datastore) UpdateDatasource

func (ds *Datastore) UpdateDatasource(pz az.Principal, datasourceId int64, datasource Datasource) error

func (*Datastore) UpdateIdentity

func (ds *Datastore) UpdateIdentity(pz az.Principal, identityId int64, password string) error

func (*Datastore) UpdateLabel

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

func (*Datastore) UpdateModelLocation

func (ds *Datastore) UpdateModelLocation(pz az.Principal, modelId int64, location, logicalName string) error

func (*Datastore) UpdateModelName

func (ds *Datastore) UpdateModelName(pz az.Principal, modelId int64, name string) error

func (*Datastore) UpdateModelObjectType

func (ds *Datastore) UpdateModelObjectType(pz az.Principal, modelId int64, typ string) error

func (*Datastore) UpdateRole

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

func (*Datastore) UpdateServiceName

func (ds *Datastore) UpdateServiceName(pz az.Principal, serviceId int64, name string) error

func (*Datastore) UpdateServiceState

func (ds *Datastore) UpdateServiceState(pz az.Principal, serviceId int64, state string) error

func (*Datastore) UpdateWorkgroup

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

type Engine

type Engine struct {
	Id       int64
	Name     string
	Location string
	Created  time.Time
}

func ScanEngine

func ScanEngine(r *sql.Row) (Engine, error)

func ScanEngines

func ScanEngines(rs *sql.Rows) ([]Engine, error)

type EntityHistory

type EntityHistory struct {
	IdentityId  int64
	Action      string
	Description string
	Created     time.Time
}

func ScanEntityHistory

func ScanEntityHistory(r *sql.Row) (EntityHistory, error)

func ScanEntityHistorys

func ScanEntityHistorys(rs *sql.Rows) ([]EntityHistory, error)

type EntityPrivilege

type EntityPrivilege struct {
	Type                 string
	WorkgroupId          int64
	WorkgroupName        string
	WorkgroupDescription string
}

func ScanEntityPrivilege

func ScanEntityPrivilege(r *sql.Row) (EntityPrivilege, error)

func ScanEntityPrivileges

func ScanEntityPrivileges(rs *sql.Rows) ([]EntityPrivilege, error)

type EntityType

type EntityType struct {
	Id   int64
	Name string
}

func ScanEntityType

func ScanEntityType(r *sql.Row) (EntityType, error)

func ScanEntityTypes

func ScanEntityTypes(rs *sql.Rows) ([]EntityType, error)

type EntityTypeKeys

type EntityTypeKeys struct {
	Role       int64
	Workgroup  int64
	Identity   int64
	Engine     int64
	Cluster    int64
	Project    int64
	Datasource int64
	Dataset    int64
	Model      int64
	Label      int64
	Service    int64
}

type Identity

type Identity struct {
	Id        int64
	Name      string
	IsActive  bool
	LastLogin pq.NullTime
	Created   time.Time
}

func ScanIdentity

func ScanIdentity(r *sql.Row) (Identity, error)

func ScanIdentitys

func ScanIdentitys(rs *sql.Rows) ([]Identity, error)

type IdentityAndPassword

type IdentityAndPassword struct {
	Id          int64
	Name        string
	Password    string
	WorkgroupId int64
	IsActive    bool
	LastLogin   pq.NullTime
	Created     time.Time
}

func ScanIdentityAndPassword

func ScanIdentityAndPassword(r *sql.Row) (IdentityAndPassword, error)

func ScanIdentityAndPasswords

func ScanIdentityAndPasswords(rs *sql.Rows) ([]IdentityAndPassword, error)

type IdentityAndRole

type IdentityAndRole struct {
	Kind         string
	IdentityId   int64
	IdentityName string
	RoleId       int64
	RoleName     string
}

func ScanIdentityAndRole

func ScanIdentityAndRole(r *sql.Row) (IdentityAndRole, error)

func ScanIdentityAndRoles

func ScanIdentityAndRoles(rs *sql.Rows) ([]IdentityAndRole, error)

type Label

type Label struct {
	Id          int64
	ProjectId   int64
	ModelId     sql.NullInt64
	Name        string
	Description string
	Created     time.Time
}

func ScanLabel

func ScanLabel(r *sql.Row) (Label, error)

func ScanLabels

func ScanLabels(rs *sql.Rows) ([]Label, error)

type Meta

type Meta struct {
	Id    int64
	Key   string
	Value string
}

func ScanMeta

func ScanMeta(r *sql.Row) (Meta, error)

func ScanMetas

func ScanMetas(rs *sql.Rows) ([]Meta, error)

type Model

type Model struct {
	Id                  int64
	ProjectId           int64
	TrainingDatasetId   int64
	ValidationDatasetId sql.NullInt64
	Name                string
	ClusterId           int64
	ClusterName         string
	ModelKey            string
	Algorithm           string
	ModelCategory       string
	DatasetName         string
	ResponseColumnName  string
	LogicalName         sql.NullString
	Location            string
	ModelObjectType     sql.NullString
	MaxRunTime          int64
	Metrics             string
	MetricsVersion      string
	Created             time.Time
	LabelId             sql.NullInt64
	LabelName           sql.NullString
}

func ScanModel

func ScanModel(r *sql.Row) (Model, error)

func ScanModels

func ScanModels(rs *sql.Rows) ([]Model, error)

type MultinomialModel

type MultinomialModel struct {
	Id                  int64
	ProjectId           int64
	TrainingDatasetId   int64
	ValidationDatasetId sql.NullInt64
	Name                string
	ClusterId           int64
	ClusterName         string
	ModelKey            string
	Algorithm           string
	ModelCategory       string
	DatasetName         string
	ResponseColumnName  string
	LogicalName         sql.NullString
	Location            string
	ModelObjectType     sql.NullString
	MaxRunTime          int64
	Metrics             string
	MetricsVersion      string
	Created             time.Time
	LabelId             sql.NullInt64
	LabelName           sql.NullString
	Mse                 float64
	RSquared            float64
	Logloss             float64
}

func ScanMultinomialModel

func ScanMultinomialModel(r *sql.Row) (MultinomialModel, error)

func ScanMultinomialModels

func ScanMultinomialModels(rs *sql.Rows) ([]MultinomialModel, error)

type Permission

type Permission struct {
	Id          int64
	Code        string
	Description string
}

func ScanPermission

func ScanPermission(r *sql.Row) (Permission, error)

func ScanPermissions

func ScanPermissions(rs *sql.Rows) ([]Permission, error)

type PermissionKeys

type PermissionKeys struct {
	ManageRole       int64
	ViewRole         int64
	ManageWorkgroup  int64
	ViewWorkgroup    int64
	ManageIdentity   int64
	ViewIdentity     int64
	ManageEngine     int64
	ViewEngine       int64
	ManageCluster    int64
	ViewCluster      int64
	ManageProject    int64
	ViewProject      int64
	ManageDatasource int64
	ViewDatasource   int64
	ManageDataset    int64
	ViewDataset      int64
	ManageModel      int64
	ViewModel        int64
	ManageLabel      int64
	ViewLabel        int64
	ManageService    int64
	ViewService      int64
}

type Principal

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

func (*Principal) CanEdit

func (pz *Principal) CanEdit(entityTypeId, entityId int64) (bool, error)

func (*Principal) CanView

func (pz *Principal) CanView(entityTypeId, entityId int64) (bool, error)

func (*Principal) CheckEdit

func (pz *Principal) CheckEdit(entityTypeId, entityId int64) error

func (*Principal) CheckOwns

func (pz *Principal) CheckOwns(entityTypeId, entityId int64) error

func (*Principal) CheckPermission

func (pz *Principal) CheckPermission(code int64) error

func (*Principal) CheckView

func (pz *Principal) CheckView(entityTypeId, entityId int64) error

func (*Principal) HasPermission

func (pz *Principal) HasPermission(code int64) bool

func (*Principal) Id

func (pz *Principal) Id() int64

func (*Principal) IsActive

func (pz *Principal) IsActive() bool

func (*Principal) IsSuperuser

func (pz *Principal) IsSuperuser() bool

func (*Principal) Name

func (pz *Principal) Name() string

func (*Principal) Owns

func (pz *Principal) Owns(entityTypeId, entityId int64) (bool, error)

func (*Principal) Password

func (pz *Principal) Password() string

func (*Principal) String

func (pz *Principal) String() string

func (*Principal) WorkgroupId

func (pz *Principal) WorkgroupId() int64

type Privilege

type Privilege struct {
	Type        string
	WorkgroupId int64
	EntityType  int64
	EntityId    int64
}

func ScanPrivilege

func ScanPrivilege(r *sql.Row) (Privilege, error)

func ScanPrivileges

func ScanPrivileges(rs *sql.Rows) ([]Privilege, error)

type Project

type Project struct {
	Id            int64
	Name          string
	Description   string
	ModelCategory string
	Created       time.Time
}

func ScanProject

func ScanProject(r *sql.Row) (Project, error)

func ScanProjects

func ScanProjects(rs *sql.Rows) ([]Project, error)

type RegressionModel

type RegressionModel struct {
	Id                   int64
	ProjectId            int64
	TrainingDatasetId    int64
	ValidationDatasetId  sql.NullInt64
	Name                 string
	ClusterId            int64
	ClusterName          string
	ModelKey             string
	Algorithm            string
	ModelCategory        string
	DatasetName          string
	ResponseColumnName   string
	LogicalName          sql.NullString
	Location             string
	ModelObjectType      sql.NullString
	MaxRunTime           int64
	Metrics              string
	MetricsVersion       string
	Created              time.Time
	LabelId              sql.NullInt64
	LabelName            sql.NullString
	Mse                  float64
	RSquared             float64
	MeanResidualDeviance float64
}

func ScanRegressionModel

func ScanRegressionModel(r *sql.Row) (RegressionModel, error)

func ScanRegressionModels

func ScanRegressionModels(rs *sql.Rows) ([]RegressionModel, error)

type Role

type Role struct {
	Id          int64
	Name        string
	Description string
	Created     time.Time
}

func ScanRole

func ScanRole(r *sql.Row) (Role, error)

func ScanRoles

func ScanRoles(rs *sql.Rows) ([]Role, error)

type Service

type Service struct {
	Id        int64
	ProjectId int64
	ModelId   int64
	Name      string
	Address   string
	Port      int64
	ProcessId int64
	State     string
	Created   time.Time
}

func ScanService

func ScanService(r *sql.Row) (Service, error)

func ScanServices

func ScanServices(rs *sql.Rows) ([]Service, error)

type Workgroup

type Workgroup struct {
	Id          int64
	Type        string
	Name        string
	Description string
	Created     time.Time
}

func ScanWorkgroup

func ScanWorkgroup(r *sql.Row) (Workgroup, error)

func ScanWorkgroups

func ScanWorkgroups(rs *sql.Rows) ([]Workgroup, error)

type YarnCluster

type YarnCluster struct {
	Id            int64
	EngineId      int64
	Size          int64
	ApplicationId string
	Memory        string
	Username      string
	OutputDir     string
}

func ScanYarnCluster

func ScanYarnCluster(r *sql.Row) (YarnCluster, error)

func ScanYarnClusters

func ScanYarnClusters(rs *sql.Rows) ([]YarnCluster, error)

Jump to

Keyboard shortcuts

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