Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDatabaseNil = errors.New("Database is nil") ErrInvalidDatabaseType = errors.New("Invalid database type") ErrStateNotFound = errors.New("state not found") ErrDuplicateUserMail = errors.New("User with this email already in database") )
Default errors
Functions ¶
This section is empty.
Types ¶
type Artifact202303201338 ¶
type Artifact202303201338 struct { ID string `gorm:"primaryKey;"` ProjectID string `gorm:"primaryKey;column:project_id;not null" sql:"type:uuid;"` Size int `gorm:"column:size;not null"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
func (Artifact202303201338) TableName ¶
func (Artifact202303201338) TableName() string
type Artifact202304131325 ¶
type Artifact202304131325 struct { ID string `gorm:"primaryKey"` ProjectID string `gorm:"column:project_id;not null;index" sql:"type:uuid"` ArtifactID string `gorm:"column:artifact_id;not null;index"` Size int `gorm:"column:size;not null"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
func (Artifact202304131325) TableName ¶
func (Artifact202304131325) TableName() string
type DatabaseType ¶
type DatabaseType string
const ( Postgres DatabaseType = "postgres" DigitalOceanPostgres DatabaseType = "digital_ocean_postgres" )
func (*DatabaseType) String ¶
func (dbt *DatabaseType) String() string
type Option ¶
type Option func(*database)
func WithConfig ¶
func WithPostgres ¶
type Project202303201338 ¶
type Project202303201338 struct { ID string `gorm:"primaryKey;" sql:"type:uuid;"` Name string `gorm:"column:name;not null"` Description string `gorm:"column:description;not null"` Artifacts []*Artifact202303201338 `gorm:"foreignKey:ProjectID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
func (Project202303201338) TableName ¶
func (Project202303201338) TableName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.