Documentation ¶
Overview ¶
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Package models contains the types for schema 'public'.
Index ¶
- Constants
- Variables
- type Activity
- func (a *Activity) Application(db XODB) (*Application, error)
- func (a *Activity) Delete(db XODB) error
- func (a *Activity) Deleted() bool
- func (a *Activity) Deployment(db XODB) (*Deployment, error)
- func (a *Activity) Environment(db XODB) (*Environment, error)
- func (a *Activity) Exists() bool
- func (a *Activity) Insert(db XODB) error
- func (a *Activity) Save(db XODB) error
- func (a *Activity) Update(db XODB) error
- func (a *Activity) Upsert(db XODB) error
- func (a *Activity) User(db XODB) (*User, error)
- type ActivityType
- type AppType
- type Application
- func (a *Application) Delete(db XODB) error
- func (a *Application) Deleted() bool
- func (a *Application) Exists() bool
- func (a *Application) Insert(db XODB) error
- func (a *Application) Save(db XODB) error
- func (a *Application) Update(db XODB) error
- func (a *Application) Upsert(db XODB) error
- func (a *Application) User(db XODB) (*User, error)
- type Configuration
- func (c *Configuration) Delete(db XODB) error
- func (c *Configuration) Deleted() bool
- func (c *Configuration) Environment(db XODB) (*Environment, error)
- func (c *Configuration) Exists() bool
- func (c *Configuration) Insert(db XODB) error
- func (c *Configuration) Save(db XODB) error
- func (c *Configuration) Update(db XODB) error
- func (c *Configuration) Upsert(db XODB) error
- type CreationStateType
- type DeletionStateType
- type Deployment
- func (d *Deployment) Application(db XODB) (*Application, error)
- func (d *Deployment) Delete(db XODB) error
- func (d *Deployment) Deleted() bool
- func (d *Deployment) Environment(db XODB) (*Environment, error)
- func (d *Deployment) Exists() bool
- func (d *Deployment) Insert(db XODB) error
- func (d *Deployment) Save(db XODB) error
- func (d *Deployment) Update(db XODB) error
- func (d *Deployment) Upsert(db XODB) error
- type Environment
- func (e *Environment) Application(db XODB) (*Application, error)
- func (e *Environment) Delete(db XODB) error
- func (e *Environment) Deleted() bool
- func (e *Environment) Exists() bool
- func (e *Environment) Insert(db XODB) error
- func (e *Environment) Save(db XODB) error
- func (e *Environment) Update(db XODB) error
- func (e *Environment) Upsert(db XODB) error
- type ScannerValuer
- type Slice
- type StringSlice
- type User
- type XODB
Constants ¶
const ( // ActivityTypeApplicationCreated is the 'application_created' ActivityType. ActivityTypeApplicationCreated = ActivityType(1) // ActivityTypeApplicationDeleted is the 'application_deleted' ActivityType. ActivityTypeApplicationDeleted = ActivityType(2) // ActivityTypeDeploymentStarted is the 'deployment_started' ActivityType. ActivityTypeDeploymentStarted = ActivityType(3) // ActivityTypeDeploymentSuccess is the 'deployment_success' ActivityType. ActivityTypeDeploymentSuccess = ActivityType(4) // ActivityTypeDeploymentFailure is the 'deployment_failure' ActivityType. ActivityTypeDeploymentFailure = ActivityType(5) // ActivityTypeEnvironmentCreated is the 'environment_created' ActivityType. ActivityTypeEnvironmentCreated = ActivityType(6) // ActivityTypeEnvironmentDestroyed is the 'environment_destroyed' ActivityType. ActivityTypeEnvironmentDestroyed = ActivityType(7) )
const ( // AppTypeServer is the 'server' AppType. AppTypeServer = AppType(1) // AppTypeCronjob is the 'cronjob' AppType. AppTypeCronjob = AppType(2) )
const ( // CreationStateTypeCreateInfrastructureWait is the 'CREATE_INFRASTRUCTURE_WAIT' CreationStateType. CreationStateTypeCreateInfrastructureWait = CreationStateType(1) // CreationStateTypeCreateInfrastructureSucceeded is the 'CREATE_INFRASTRUCTURE_SUCCEEDED' CreationStateType. CreationStateTypeCreateInfrastructureSucceeded = CreationStateType(2) // CreationStateTypeCreateInfrastructureFailed is the 'CREATE_INFRASTRUCTURE_FAILED' CreationStateType. CreationStateTypeCreateInfrastructureFailed = CreationStateType(3) )
const ( // DeletionStateTypeNotDeleted is the 'NOT_DELETED' DeletionStateType. DeletionStateTypeNotDeleted = DeletionStateType(1) // DeletionStateTypeDeleteInfrastructureWait is the 'DELETE_INFRASTRUCTURE_WAIT' DeletionStateType. DeletionStateTypeDeleteInfrastructureWait = DeletionStateType(2) // DeletionStateTypeDeleteInfrastructureSucceeded is the 'DELETE_INFRASTRUCTURE_SUCCEEDED' DeletionStateType. DeletionStateTypeDeleteInfrastructureSucceeded = DeletionStateType(3) // DeletionStateTypeDeleteInfrastructureFailed is the 'DELETE_INFRASTRUCTURE_FAILED' DeletionStateType. DeletionStateTypeDeleteInfrastructureFailed = DeletionStateType(4) )
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { ID int `json:"id"` // id UserID sql.NullInt64 `json:"user_id"` // user_id Activity ActivityType `json:"activity"` // activity ApplicationID sql.NullInt64 `json:"application_id"` // application_id DeploymentID sql.NullInt64 `json:"deployment_id"` // deployment_id EnvironmentID sql.NullInt64 `json:"environment_id"` // environment_id CreatedAt time.Time `json:"created_at"` // created_at // contains filtered or unexported fields }
Activity represents a row from 'public.activities'.
func ActivityByID ¶
ActivityByID retrieves a row from 'public.activities' as a Activity.
Generated from index 'activities_pkey'.
func (*Activity) Application ¶
func (a *Activity) Application(db XODB) (*Application, error)
Application returns the Application associated with the Activity's ApplicationID (application_id).
Generated from foreign key 'activities_application_id_fkey'.
func (*Activity) Deleted ¶
Deleted provides information if the Activity has been deleted from the database.
func (*Activity) Deployment ¶
func (a *Activity) Deployment(db XODB) (*Deployment, error)
Deployment returns the Deployment associated with the Activity's DeploymentID (deployment_id).
Generated from foreign key 'activities_deployment_id_fkey'.
func (*Activity) Environment ¶
func (a *Activity) Environment(db XODB) (*Environment, error)
Environment returns the Environment associated with the Activity's EnvironmentID (environment_id).
Generated from foreign key 'activities_environment_id_fkey'.
type ActivityType ¶
type ActivityType uint16
ActivityType is the 'activity_type' enum type from schema 'public'.
func (ActivityType) MarshalText ¶
func (at ActivityType) MarshalText() ([]byte, error)
MarshalText marshals ActivityType into text.
func (*ActivityType) Scan ¶
func (at *ActivityType) Scan(src interface{}) error
Scan satisfies the database/sql.Scanner interface for ActivityType.
func (ActivityType) String ¶
func (at ActivityType) String() string
String returns the string value of the ActivityType.
func (*ActivityType) UnmarshalText ¶
func (at *ActivityType) UnmarshalText(text []byte) error
UnmarshalText unmarshals ActivityType from text.
type AppType ¶
type AppType uint16
AppType is the 'app_type' enum type from schema 'public'.
func (AppType) MarshalText ¶
MarshalText marshals AppType into text.
func (*AppType) UnmarshalText ¶
UnmarshalText unmarshals AppType from text.
type Application ¶
type Application struct { ID int `json:"id"` // id UserID int `json:"user_id"` // user_id Name string `json:"name"` // name Type AppType `json:"type"` // type Slug string `json:"slug"` // slug Description sql.NullString `json:"description"` // description InternalDNS sql.NullString `json:"internal_dns"` // internal_dns ExternalDNS sql.NullString `json:"external_dns"` // external_dns GithubRepoURL sql.NullString `json:"github_repo_url"` // github_repo_url DockerfilePath sql.NullString `json:"dockerfile_path"` // dockerfile_path EntrypointOverride sql.NullString `json:"entrypoint_override"` // entrypoint_override AwsEncryptionKeyArn string `json:"aws_encryption_key_arn"` // aws_encryption_key_arn CreationState CreationStateType `json:"creation_state"` // creation_state DeletionState DeletionStateType `json:"deletion_state"` // deletion_state CreatedAt time.Time `json:"created_at"` // created_at UpdatedAt time.Time `json:"updated_at"` // updated_at DeletedAt pq.NullTime `json:"deleted_at"` // deleted_at // contains filtered or unexported fields }
Application represents a row from 'public.applications'.
func ApplicationByID ¶
func ApplicationByID(db XODB, id int) (*Application, error)
ApplicationByID retrieves a row from 'public.applications' as a Application.
Generated from index 'applications_pkey'.
func (*Application) Delete ¶
func (a *Application) Delete(db XODB) error
Delete deletes the Application from the database.
func (*Application) Deleted ¶
func (a *Application) Deleted() bool
Deleted provides information if the Application has been deleted from the database.
func (*Application) Exists ¶
func (a *Application) Exists() bool
Exists determines if the Application exists in the database.
func (*Application) Insert ¶
func (a *Application) Insert(db XODB) error
Insert inserts the Application to the database.
func (*Application) Save ¶
func (a *Application) Save(db XODB) error
Save saves the Application to the database.
func (*Application) Update ¶
func (a *Application) Update(db XODB) error
Update updates the Application in the database.
func (*Application) Upsert ¶
func (a *Application) Upsert(db XODB) error
Upsert performs an upsert for Application.
NOTE: PostgreSQL 9.5+ only
type Configuration ¶
type Configuration struct { EnvironmentID int `json:"environment_id"` // environment_id Version int `json:"version"` // version CreatedAt time.Time `json:"created_at"` // created_at // contains filtered or unexported fields }
Configuration represents a row from 'public.configurations'.
func ConfigurationByEnvironmentIDVersion ¶
func ConfigurationByEnvironmentIDVersion(db XODB, environmentID int, version int) (*Configuration, error)
ConfigurationByEnvironmentIDVersion retrieves a row from 'public.configurations' as a Configuration.
Generated from index 'configurations_pkey'.
func (*Configuration) Delete ¶
func (c *Configuration) Delete(db XODB) error
Delete deletes the Configuration from the database.
func (*Configuration) Deleted ¶
func (c *Configuration) Deleted() bool
Deleted provides information if the Configuration has been deleted from the database.
func (*Configuration) Environment ¶
func (c *Configuration) Environment(db XODB) (*Environment, error)
Environment returns the Environment associated with the Configuration's EnvironmentID (environment_id).
Generated from foreign key 'configurations_environment_id_fkey'.
func (*Configuration) Exists ¶
func (c *Configuration) Exists() bool
Exists determines if the Configuration exists in the database.
func (*Configuration) Insert ¶
func (c *Configuration) Insert(db XODB) error
Insert inserts the Configuration to the database.
func (*Configuration) Save ¶
func (c *Configuration) Save(db XODB) error
Save saves the Configuration to the database.
func (*Configuration) Update ¶
func (c *Configuration) Update(db XODB) error
Update updates the Configuration in the database.
func (*Configuration) Upsert ¶
func (c *Configuration) Upsert(db XODB) error
Upsert performs an upsert for Configuration.
NOTE: PostgreSQL 9.5+ only
type CreationStateType ¶
type CreationStateType uint16
CreationStateType is the 'creation_state_type' enum type from schema 'public'.
func (CreationStateType) MarshalText ¶
func (cst CreationStateType) MarshalText() ([]byte, error)
MarshalText marshals CreationStateType into text.
func (*CreationStateType) Scan ¶
func (cst *CreationStateType) Scan(src interface{}) error
Scan satisfies the database/sql.Scanner interface for CreationStateType.
func (CreationStateType) String ¶
func (cst CreationStateType) String() string
String returns the string value of the CreationStateType.
func (*CreationStateType) UnmarshalText ¶
func (cst *CreationStateType) UnmarshalText(text []byte) error
UnmarshalText unmarshals CreationStateType from text.
type DeletionStateType ¶
type DeletionStateType uint16
DeletionStateType is the 'deletion_state_type' enum type from schema 'public'.
func (DeletionStateType) MarshalText ¶
func (dst DeletionStateType) MarshalText() ([]byte, error)
MarshalText marshals DeletionStateType into text.
func (*DeletionStateType) Scan ¶
func (dst *DeletionStateType) Scan(src interface{}) error
Scan satisfies the database/sql.Scanner interface for DeletionStateType.
func (DeletionStateType) String ¶
func (dst DeletionStateType) String() string
String returns the string value of the DeletionStateType.
func (*DeletionStateType) UnmarshalText ¶
func (dst *DeletionStateType) UnmarshalText(text []byte) error
UnmarshalText unmarshals DeletionStateType from text.
type Deployment ¶
type Deployment struct { ID int `json:"id"` // id ApplicationID sql.NullInt64 `json:"application_id"` // application_id EnvironmentID sql.NullInt64 `json:"environment_id"` // environment_id Committish string `json:"committish"` // committish CurrentState string `json:"current_state"` // current_state CreatedAt time.Time `json:"created_at"` // created_at // contains filtered or unexported fields }
Deployment represents a row from 'public.deployments'.
func DeploymentByID ¶
func DeploymentByID(db XODB, id int) (*Deployment, error)
DeploymentByID retrieves a row from 'public.deployments' as a Deployment.
Generated from index 'deployments_pkey'.
func (*Deployment) Application ¶
func (d *Deployment) Application(db XODB) (*Application, error)
Application returns the Application associated with the Deployment's ApplicationID (application_id).
Generated from foreign key 'deployments_application_id_fkey'.
func (*Deployment) Delete ¶
func (d *Deployment) Delete(db XODB) error
Delete deletes the Deployment from the database.
func (*Deployment) Deleted ¶
func (d *Deployment) Deleted() bool
Deleted provides information if the Deployment has been deleted from the database.
func (*Deployment) Environment ¶
func (d *Deployment) Environment(db XODB) (*Environment, error)
Environment returns the Environment associated with the Deployment's EnvironmentID (environment_id).
Generated from foreign key 'deployments_environment_id_fkey'.
func (*Deployment) Exists ¶
func (d *Deployment) Exists() bool
Exists determines if the Deployment exists in the database.
func (*Deployment) Insert ¶
func (d *Deployment) Insert(db XODB) error
Insert inserts the Deployment to the database.
func (*Deployment) Save ¶
func (d *Deployment) Save(db XODB) error
Save saves the Deployment to the database.
func (*Deployment) Update ¶
func (d *Deployment) Update(db XODB) error
Update updates the Deployment in the database.
func (*Deployment) Upsert ¶
func (d *Deployment) Upsert(db XODB) error
Upsert performs an upsert for Deployment.
NOTE: PostgreSQL 9.5+ only
type Environment ¶
type Environment struct { ID int `json:"id"` // id ApplicationID sql.NullInt64 `json:"application_id"` // application_id Name string `json:"name"` // name Slug string `json:"slug"` // slug CreatedAt time.Time `json:"created_at"` // created_at // contains filtered or unexported fields }
Environment represents a row from 'public.environments'.
func EnvironmentByApplicationIDName ¶
func EnvironmentByApplicationIDName(db XODB, applicationID sql.NullInt64, name string) (*Environment, error)
EnvironmentByApplicationIDName retrieves a row from 'public.environments' as a Environment.
Generated from index 'environments_application_id_name_key'.
func EnvironmentByApplicationIDSlug ¶
func EnvironmentByApplicationIDSlug(db XODB, applicationID sql.NullInt64, slug string) (*Environment, error)
EnvironmentByApplicationIDSlug retrieves a row from 'public.environments' as a Environment.
Generated from index 'environments_application_id_slug_key'.
func EnvironmentByID ¶
func EnvironmentByID(db XODB, id int) (*Environment, error)
EnvironmentByID retrieves a row from 'public.environments' as a Environment.
Generated from index 'environments_pkey'.
func (*Environment) Application ¶
func (e *Environment) Application(db XODB) (*Application, error)
Application returns the Application associated with the Environment's ApplicationID (application_id).
Generated from foreign key 'environments_application_id_fkey'.
func (*Environment) Delete ¶
func (e *Environment) Delete(db XODB) error
Delete deletes the Environment from the database.
func (*Environment) Deleted ¶
func (e *Environment) Deleted() bool
Deleted provides information if the Environment has been deleted from the database.
func (*Environment) Exists ¶
func (e *Environment) Exists() bool
Exists determines if the Environment exists in the database.
func (*Environment) Insert ¶
func (e *Environment) Insert(db XODB) error
Insert inserts the Environment to the database.
func (*Environment) Save ¶
func (e *Environment) Save(db XODB) error
Save saves the Environment to the database.
func (*Environment) Update ¶
func (e *Environment) Update(db XODB) error
Update updates the Environment in the database.
func (*Environment) Upsert ¶
func (e *Environment) Upsert(db XODB) error
Upsert performs an upsert for Environment.
NOTE: PostgreSQL 9.5+ only
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type User ¶
type User struct { ID int `json:"id"` // id Name string `json:"name"` // name Email string `json:"email"` // email EncryptedPassword string `json:"encrypted_password"` // encrypted_password GithubOauthAccessToken string `json:"github_oauth_access_token"` // github_oauth_access_token CreatedAt time.Time `json:"created_at"` // created_at UpdatedAt time.Time `json:"updated_at"` // updated_at // contains filtered or unexported fields }
User represents a row from 'public.users'.
func UserByEmail ¶
UserByEmail retrieves a row from 'public.users' as a User.
Generated from index 'users_email_key'.
func UserByID ¶
UserByID retrieves a row from 'public.users' as a User.
Generated from index 'users_pkey'.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.