Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { ID uuid.UUID `json:"id" db:"id"` Name dax.FieldName `json:"name" db:"name"` Type dax.BaseType `json:"type" db:"type"` TableID string `json:"table_id" db:"table_id"` Constraints string `json:"constraints" db:"constraints"` Options string `json:"options" db:"options"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
Column is used by pop to map your columns database table to your go code.
func (*Column) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Column) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Column) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Database ¶
type Database struct { // should be DatabaseID, but pop doesn't allow ID to be a custom type ID string `json:"id" db:"id"` Name dax.DatabaseName `json:"name" db:"name"` WorkersMin int `json:"workers_min" db:"workers_min"` WorkersMax int `json:"workers_max" db:"workers_max"` Description string `json:"description" db:"description"` Owner string `json:"owner" db:"owner"` UpdatedBy string `json:"updated_by" db:"updated_by"` Tables Tables `json:"tables" has_many:"tables" order_by:"name asc"` Organization *Organization `json:"organization" belongs_to:"organization"` OrganizationID string `json:"organization_id" db:"organization_id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
Database is used by pop to map your databases database table to your go code.
func (*Database) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Database) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Database) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type DirectiveVersion ¶
type DirectiveVersion struct { ID int `json:"id" db:"id"` Version int `json:"version" db:"version"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
DirectiveVersion holds what version the current directive is
func (*DirectiveVersion) String ¶
func (t *DirectiveVersion) String() string
String is not required by pop and may be deleted
type Job ¶
type Job struct { ID uuid.UUID `json:"id" db:"id"` Name dax.Job `json:"name" db:"name"` Role dax.RoleType `json:"role" db:"role"` DatabaseID dax.DatabaseID `json:"database_id" db:"database_id"` WorkerID nulls.UUID `json:"-" db:"worker_id"` Worker *Worker `json:"worker" db:"-" belongs_to:"worker"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
Job represents a job which can be assigned to a worker or free (unassigned).
func (*Job) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Job) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Job) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Node ¶
type Node struct { ID uuid.UUID `json:"id" db:"id"` Address dax.Address `json:"address" db:"address"` NodeRoles NodeRoles `json:"node_roles" has_many:"node_roles" order_by:"created_at asc"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
Node represents a host or server that is available to work on jobs.
func (*Node) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Node) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Node) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type NodeRole ¶
type NodeRole struct { ID uuid.UUID `json:"id" db:"id"` NodeID uuid.UUID `json:"node_id" db:"node_id"` Role dax.RoleType `json:"role" db:"role"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
NodeRole holds information about what types of jobs (roles) each node can perform.
type Organization ¶
type Organization struct { // Would love for this to be OrganizationID, but pop doesn't allow it for primary keys ID string `json:"id" db:"id"` Databases Databases `json:"databases" db:"-" has_many:"databases" order_by:"created_at asc"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
Organization is used by pop to map your organizations database table to your go code.
func (*Organization) String ¶
func (o *Organization) String() string
String is not required by pop and may be deleted
func (*Organization) Validate ¶
func (o *Organization) Validate(tx *pop.Connection) (*validate.Errors, error)
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Organization) ValidateCreate ¶
func (o *Organization) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Organization) ValidateUpdate ¶
func (o *Organization) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Organizations ¶
type Organizations []Organization
Organizations is not required by pop and may be deleted
func (Organizations) String ¶
func (o Organizations) String() string
String is not required by pop and may be deleted
type Table ¶
type Table struct { // ID will store the dax.Table.Key(), but must be string type due to pop's nonsense ID string `json:"id" db:"id"` Name dax.TableName `json:"name" db:"name"` Owner string `json:"owner" db:"owner"` UpdatedBy string `json:"updated_by" db:"updated_by"` Database *Database `json:"database" belongs_to:"database"` DatabaseID string `json:"database_id" db:"database_id"` OrganizationID dax.OrganizationID `json:"organization_id" db:"organization_id"` Description string `json:"description" db:"description"` PartitionN int `json:"partition_n" db:"partition_n"` Columns Columns `json:"columns" has_many:"columns" order_by:"created_at asc"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
Table is used by pop to map your tables database table to your go code.
func (*Table) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Table) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Table) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
type Worker ¶
type Worker struct { ID uuid.UUID `json:"id" db:"id"` Address dax.Address `json:"address" db:"address"` Role dax.RoleType `json:"role" db:"role"` DatabaseID nulls.String `json:"database_id" db:"database_id"` // this can be empty which means the worker is unassigned CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` Jobs Jobs `json:"jobs" has_many:"jobs" order_by:"name asc"` }
Worker is a node plus a role that gets assigned to a database and can be assigned jobs for that database.
func (*Worker) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*Worker) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*Worker) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.