Versions in this module Expand all Collapse all v1 v1.1.1 Oct 30, 2021 v1.1.0 Oct 25, 2021 Changes in this version + func InitEvent(dis event.Dispatcher) queue.InitFunc + func InitTagEvent(dis event.Dispatcher) queue.InitFunc + type Event struct + Build *Build + func (ev *Event) Name() string + func (ev *Event) Perform() error type KeyStore + func NewKeyStoreWithCrypto(db *sqlx.DB, block *crypto.AESGCM, mm ...database.Model) *KeyStore type Store + func (s *Store) Orphan(b *Build) error + type TagEvent struct + Build *Build + Tags []*Tag + User *user.User + func (ev *TagEvent) Name() string + func (ev *TagEvent) Perform() error v1.0.0 Apr 20, 2021 Changes in this version + var ErrDriver = errors.New("unknown driver") + var ErrDriverDisabled = errors.New("driver disabled") + func ArtifactModel(aa []*Artifact) func(int) database.Model + func DriverModel(dd []*Driver) func(int) database.Model + func JobModel(jj []*Job) func(int) database.Model + func KeyModel(kk []*Key) func(int) database.Model + func LoadJobRelations(loaders *database.Loaders, jj ...*Job) error + func LoadRelations(loaders *database.Loaders, bb ...*Build) error + func Model(bb []*Build) func(int) database.Model + func NewTriggerData() triggerData + func ObjectModel(oo []*Object) func(int) database.Model + func SelectObject(col string, opts ...query.Option) query.Query + func StageModel(ss []*Stage) func(int) database.Model + func TagModel(tt []*Tag) func(int) database.Model + func TriggerModel(tt []*Trigger) func(int) database.Model + func VariableModel(vv []*Variable) func(int) database.Model + func WhereSearch(search string) query.Option + func WhereStatus(status string) query.Option + func WhereTag(tag string) query.Option + type Artifact struct + Build *Build + BuildID int64 + CreatedAt time.Time + DeletedAt sql.NullTime + Hash string + ID int64 + Job *Job + JobID int64 + MD5 []byte + Name string + SHA256 []byte + Size sql.NullInt64 + Source string + User *user.User + UserID int64 + func (a *Artifact) Bind(mm ...database.Model) + func (a *Artifact) Endpoint(uris ...string) string + func (a *Artifact) IsZero() bool + func (a *Artifact) JSON(addr string) map[string]interface{} + func (a *Artifact) Primary() (string, int64) + func (a *Artifact) SetPrimary(id int64) + func (a *Artifact) Values() map[string]interface{} + type ArtifactStore struct + Build *Build + Job *Job + User *user.User + func NewArtifactStore(db *sqlx.DB, mm ...database.Model) *ArtifactStore + func NewArtifactStoreWithCollector(db *sqlx.DB, c runner.Collector, mm ...database.Model) *ArtifactStore + func (s *ArtifactStore) All(opts ...query.Option) ([]*Artifact, error) + func (s *ArtifactStore) Bind(mm ...database.Model) + func (s *ArtifactStore) Collect(name string, r io.Reader) (int64, error) + func (s *ArtifactStore) Create(hash, src, dst string) (*Artifact, error) + func (s *ArtifactStore) Deleted(ids ...int64) error + func (s *ArtifactStore) Get(opts ...query.Option) (*Artifact, error) + func (s *ArtifactStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s *ArtifactStore) New() *Artifact + type Build struct + CreatedAt time.Time + Driver *Driver + FinishedAt sql.NullTime + ID int64 + Manifest manifest.Manifest + Namespace *namespace.Namespace + NamespaceID sql.NullInt64 + Number int64 + Output sql.NullString + Secret sql.NullString + Stages []*Stage + StartedAt sql.NullTime + Status runner.Status + Tags []*Tag + Trigger *Trigger + User *user.User + UserID int64 + func FromContext(ctx context.Context) (*Build, bool) + func (b *Build) Bind(mm ...database.Model) + func (b *Build) Endpoint(uri ...string) string + func (b *Build) IsZero() bool + func (b *Build) JSON(addr string) map[string]interface{} + func (b *Build) Kill(client *redis.Client) error + func (b *Build) Primary() (string, int64) + func (b *Build) SetPrimary(id int64) + func (b *Build) Values() map[string]interface{} + type Curator struct + func NewCurator(db *sqlx.DB, artifacts fs.Store, limit int64) Curator + func (c *Curator) Invoke(log *log.Logger) error + type Driver struct + Build *Build + BuildID int64 + Config manifest.Driver + ID int64 + Type driver.Type + func (*Driver) Endpoint(_ ...string) string + func (*Driver) JSON(_ string) map[string]interface{} + func (d *Driver) Bind(mm ...database.Model) + func (d *Driver) IsZero() bool + func (d *Driver) Primary() (string, int64) + func (d *Driver) SetPrimary(id int64) + func (d *Driver) Values() map[string]interface{} + type DriverStore struct + Build *Build + func NewDriverStore(db *sqlx.DB, mm ...database.Model) *DriverStore + func (s *DriverStore) All(opts ...query.Option) ([]*Driver, error) + func (s *DriverStore) Bind(mm ...database.Model) + func (s *DriverStore) Create(cfg map[string]string) (*Driver, error) + func (s *DriverStore) Get(opts ...query.Option) (*Driver, error) + func (s *DriverStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s *DriverStore) New() *Driver + type Form struct + Comment string + Manifest manifest.Manifest + Tags tags + func (f Form) Fields() map[string]string + func (f Form) Validate() error + type Job struct + Artifacts []*Artifact + Build *Build + BuildID int64 + Commands string + CreatedAt time.Time + FinishedAt sql.NullTime + ID int64 + Name string + Output sql.NullString + Stage *Stage + StageID int64 + StartedAt sql.NullTime + Status runner.Status + func (j *Job) Bind(mm ...database.Model) + func (j *Job) Endpoint(uri ...string) string + func (j *Job) IsZero() bool + func (j *Job) JSON(addr string) map[string]interface{} + func (j *Job) Job(w io.Writer) *runner.Job + func (j *Job) Primary() (string, int64) + func (j *Job) SetPrimary(id int64) + func (j *Job) Values() map[string]interface{} + type JobStore struct + Build *Build + Stage *Stage + func NewJobStore(db *sqlx.DB, mm ...database.Model) *JobStore + func (s *JobStore) All(opts ...query.Option) ([]*Job, error) + func (s *JobStore) Bind(mm ...database.Model) + func (s *JobStore) Create(name, commands string) (*Job, error) + func (s *JobStore) Finished(id int64, output string, status runner.Status) error + func (s *JobStore) Get(opts ...query.Option) (*Job, error) + func (s *JobStore) Index(vals url.Values, opts ...query.Option) ([]*Job, error) + func (s *JobStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s *JobStore) New() *Job + func (s *JobStore) Started(id int64) error + type Key struct + Build *Build + BuildID int64 + Config string + ID int64 + Key []byte + KeyID sql.NullInt64 + Location string + Name string + func (*Key) Endpoint(_ ...string) string + func (k *Key) Bind(mm ...database.Model) + func (k *Key) IsZero() bool + func (k *Key) JSON(addr string) map[string]interface{} + func (k *Key) Primary() (string, int64) + func (k *Key) SetPrimary(id int64) + func (k *Key) Values() map[string]interface{} + type KeyStore struct + Build *Build + Key *key.Key + func NewKeyStore(db *sqlx.DB, mm ...database.Model) *KeyStore + func NewKeyStoreWithBlock(db *sqlx.DB, block *crypto.Block, mm ...database.Model) *KeyStore + func (s *KeyStore) All(opts ...query.Option) ([]*Key, error) + func (s *KeyStore) Bind(mm ...database.Model) + func (s *KeyStore) Copy(kk ...*key.Key) ([]*Key, error) + func (s *KeyStore) Get(opts ...query.Option) (*Key, error) + func (s *KeyStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s *KeyStore) New() *Key + type Object struct + Build *Build + BuildID int64 + CreatedAt time.Time + ID int64 + Name string + Object *object.Object + ObjectID sql.NullInt64 + Placed bool + Source string + func (o *Object) Bind(mm ...database.Model) + func (o *Object) Endpoint(_ ...string) string + func (o *Object) IsZero() bool + func (o *Object) JSON(addr string) map[string]interface{} + func (o *Object) Primary() (string, int64) + func (o *Object) SetPrimary(id int64) + func (o *Object) Values() map[string]interface{} + type ObjectStore struct + Build *Build + Object *object.Object + func NewObjectStore(db *sqlx.DB, mm ...database.Model) *ObjectStore + func NewObjectStoreWithPlacer(db *sqlx.DB, p runner.Placer, mm ...database.Model) *ObjectStore + func (s *ObjectStore) All(opts ...query.Option) ([]*Object, error) + func (s *ObjectStore) Bind(mm ...database.Model) + func (s *ObjectStore) Create(objectId int64, name, dst string) (*Object, error) + func (s *ObjectStore) Get(opts ...query.Option) (*Object, error) + func (s *ObjectStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s *ObjectStore) New() *Object + func (s *ObjectStore) Place(name string, w io.Writer) (int64, error) + func (s *ObjectStore) Stat(name string) (os.FileInfo, error) + type Payload struct + BuildID int64 + Host string + type Stage struct + Build *Build + BuildID int64 + CanFail bool + CreatedAt time.Time + FinishedAt sql.NullTime + ID int64 + Jobs []*Job + Name string + StartedAt sql.NullTime + Status runner.Status + func (s *Stage) Bind(mm ...database.Model) + func (s *Stage) Endpoint(_ ...string) string + func (s *Stage) IsZero() bool + func (s *Stage) JSON(addr string) map[string]interface{} + func (s *Stage) SetPrimary(id int64) + func (s *Stage) Values() map[string]interface{} + func (s Stage) Primary() (string, int64) + func (s Stage) Stage() *runner.Stage + type StageStore struct + Build *Build + func NewStageStore(db *sqlx.DB, mm ...database.Model) *StageStore + func (s *StageStore) Bind(mm ...database.Model) + func (s *StageStore) Create(name string, canFail bool) (*Stage, error) + func (s StageStore) All(opts ...query.Option) ([]*Stage, error) + func (s StageStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s StageStore) New() *Stage + type Store struct + Namespace *namespace.Namespace + User *user.User + func NewStore(db *sqlx.DB, mm ...database.Model) *Store + func NewStoreWithHasher(db *sqlx.DB, hasher *crypto.Hasher, mm ...database.Model) *Store + func (s *Store) All(opts ...query.Option) ([]*Build, error) + func (s *Store) Bind(mm ...database.Model) + func (s *Store) Create(m manifest.Manifest, t *Trigger, tags ...string) (*Build, error) + func (s *Store) Finished(id int64, output string, status runner.Status) error + func (s *Store) Get(opts ...query.Option) (*Build, error) + func (s *Store) Index(vals url.Values, opts ...query.Option) ([]*Build, database.Paginator, error) + func (s *Store) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s *Store) New() *Build + func (s *Store) Paginate(page int64, opts ...query.Option) (database.Paginator, error) + func (s *Store) Started(id int64) error + func (s *Store) Submit(ctx context.Context, prd *curlyq.Producer, host string, b *Build) error + type Tag struct + Build *Build + BuildID int64 + CreatedAt time.Time + ID int64 + Name string + User *user.User + UserID int64 + func (t *Tag) Bind(mm ...database.Model) + func (t *Tag) IsZero() bool + func (t *Tag) JSON(addr string) map[string]interface{} + func (t *Tag) SetPrimary(i int64) + func (t *Tag) Values() map[string]interface{} + func (t Tag) Endpoint(uri ...string) string + func (t Tag) Primary() (string, int64) + type TagForm struct + Tags tags + func (f *TagForm) Fields() map[string]string + func (f *TagForm) UnmarshalJSON(data []byte) error + func (f *TagForm) Validate() error + type TagStore struct + Build *Build + User *user.User + func NewTagStore(db *sqlx.DB, mm ...database.Model) *TagStore + func (s *TagStore) Bind(mm ...database.Model) + func (s *TagStore) Create(userId int64, names ...string) ([]*Tag, error) + func (s *TagStore) Delete(buildId int64, name string) error + func (s TagStore) All(opts ...query.Option) ([]*Tag, error) + func (s TagStore) Get(opts ...query.Option) (*Tag, error) + func (s TagStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s TagStore) New() *Tag + type Trigger struct + Build *Build + BuildID int64 + Comment string + CreatedAt time.Time + Data triggerData + ID int64 + ProviderID sql.NullInt64 + RepoID sql.NullInt64 + Type TriggerType + func (*Trigger) Endpoint(_ ...string) string + func (t *Trigger) Bind(mm ...database.Model) + func (t *Trigger) IsZero() bool + func (t *Trigger) JSON(_ string) map[string]interface{} + func (t *Trigger) SetPrimary(i int64) + func (t Trigger) CommentBody() string + func (t Trigger) CommentTitle() string + func (t Trigger) Primary() (string, int64) + func (t Trigger) String() string + func (t Trigger) Values() map[string]interface{} + type TriggerStore struct + Build *Build + func NewTriggerStore(db *sqlx.DB, mm ...database.Model) *TriggerStore + func (s *TriggerStore) Bind(mm ...database.Model) + func (s *TriggerStore) Create(tt ...*Trigger) error + func (s TriggerStore) All(opts ...query.Option) ([]*Trigger, error) + func (s TriggerStore) Get(opts ...query.Option) (*Trigger, error) + func (s TriggerStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + type TriggerType uint8 + const Manual + const Pull + const Push + const Schedule + func (i TriggerType) String() string + func (t *TriggerType) Scan(val interface{}) error + func (t *TriggerType) UnmarshalText(b []byte) error + func (t TriggerType) Value() (driver.Value, error) + type Variable struct + Build *Build + BuildID int64 + ID int64 + Key string + Value string + Variable *variable.Variable + VariableID sql.NullInt64 + func (v *Variable) Bind(mm ...database.Model) + func (v *Variable) Endpoint(_ ...string) string + func (v *Variable) IsZero() bool + func (v *Variable) JSON(addr string) map[string]interface{} + func (v *Variable) SetPrimary(id int64) + func (v Variable) Primary() (string, int64) + func (v Variable) Values() map[string]interface{} + type VariableStore struct + Build *Build + Variable *variable.Variable + func NewVariableStore(db *sqlx.DB, mm ...database.Model) *VariableStore + func (s *VariableStore) Bind(mm ...database.Model) + func (s *VariableStore) Copy(vv ...*variable.Variable) ([]*Variable, error) + func (s *VariableStore) Create(key, val string) (*Variable, error) + func (s VariableStore) All(opts ...query.Option) ([]*Variable, error) + func (s VariableStore) Load(key string, vals []interface{}, load database.LoaderFunc) error + func (s VariableStore) New() *Variable