Documentation
¶
Index ¶
- type BoltStore
- func (s *BoltStore) CreatePipelineGet() ([]gaia.CreatePipeline, error)
- func (s *BoltStore) CreatePipelinePut(p *gaia.CreatePipeline) error
- func (s *BoltStore) Init() error
- func (s *BoltStore) PipelineDelete(id int) error
- func (s *BoltStore) PipelineGet(id int) (*gaia.Pipeline, error)
- func (s *BoltStore) PipelineGetAllRuns(pipelineID int) ([]gaia.PipelineRun, error)
- func (s *BoltStore) PipelineGetByName(n string) (*gaia.Pipeline, error)
- func (s *BoltStore) PipelineGetLatestRun(pipelineID int) (*gaia.PipelineRun, error)
- func (s *BoltStore) PipelineGetRunByPipelineIDAndID(pipelineid int, runid int) (*gaia.PipelineRun, error)
- func (s *BoltStore) PipelineGetRunHighestID(p *gaia.Pipeline) (int, error)
- func (s *BoltStore) PipelineGetScheduled(limit int) ([]*gaia.PipelineRun, error)
- func (s *BoltStore) PipelinePut(p *gaia.Pipeline) error
- func (s *BoltStore) PipelinePutRun(r *gaia.PipelineRun) error
- func (s *BoltStore) UserAuth(u *gaia.User, updateLastLogin bool) (*gaia.User, error)
- func (s *BoltStore) UserDelete(u string) error
- func (s *BoltStore) UserGet(username string) (*gaia.User, error)
- func (s *BoltStore) UserGetAll() ([]gaia.User, error)
- func (s *BoltStore) UserPut(u *gaia.User, encryptPassword bool) error
- type GaiaStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltStore ¶ added in v0.2.1
type BoltStore struct {
// contains filtered or unexported fields
}
BoltStore represents the access type for store
func NewBoltStore ¶ added in v0.2.1
func NewBoltStore() *BoltStore
NewBoltStore creates a new instance of Store.
func (*BoltStore) CreatePipelineGet ¶ added in v0.2.1
func (s *BoltStore) CreatePipelineGet() ([]gaia.CreatePipeline, error)
CreatePipelineGet returns all available create pipeline objects in the store.
func (*BoltStore) CreatePipelinePut ¶ added in v0.2.1
func (s *BoltStore) CreatePipelinePut(p *gaia.CreatePipeline) error
CreatePipelinePut adds a pipeline which is not yet compiled but is about to.
func (*BoltStore) Init ¶ added in v0.2.1
Init creates the data folder if not exists, generates private key and bolt database. This should be called only once per database because bolt holds a lock on the database file.
func (*BoltStore) PipelineDelete ¶ added in v0.2.1
PipelineDelete deletes the pipeline with the given id.
func (*BoltStore) PipelineGet ¶ added in v0.2.1
PipelineGet gets a pipeline by given id.
func (*BoltStore) PipelineGetAllRuns ¶ added in v0.2.1
func (s *BoltStore) PipelineGetAllRuns(pipelineID int) ([]gaia.PipelineRun, error)
PipelineGetAllRuns looks for all pipeline runs by the given pipeline id.
func (*BoltStore) PipelineGetByName ¶ added in v0.2.1
PipelineGetByName looks up a pipeline by the given name. Returns nil if pipeline was not found.
func (*BoltStore) PipelineGetLatestRun ¶ added in v0.2.1
func (s *BoltStore) PipelineGetLatestRun(pipelineID int) (*gaia.PipelineRun, error)
PipelineGetLatestRun returns the latest run by the given pipeline id.
func (*BoltStore) PipelineGetRunByPipelineIDAndID ¶ added in v0.2.1
func (s *BoltStore) PipelineGetRunByPipelineIDAndID(pipelineid int, runid int) (*gaia.PipelineRun, error)
PipelineGetRunByPipelineIDAndID looks for pipeline run by given pipeline id and run id.
func (*BoltStore) PipelineGetRunHighestID ¶ added in v0.2.1
PipelineGetRunHighestID looks for the highest public id for the given pipeline.
func (*BoltStore) PipelineGetScheduled ¶ added in v0.2.1
func (s *BoltStore) PipelineGetScheduled(limit int) ([]*gaia.PipelineRun, error)
PipelineGetScheduled returns the scheduled pipelines with a return limit.
func (*BoltStore) PipelinePut ¶ added in v0.2.1
PipelinePut puts a pipeline into the store. On persist, the pipeline will get a unique id.
func (*BoltStore) PipelinePutRun ¶ added in v0.2.1
func (s *BoltStore) PipelinePutRun(r *gaia.PipelineRun) error
PipelinePutRun takes the given pipeline run and puts it into the store. If a pipeline run already exists in the store it will be overwritten.
func (*BoltStore) UserAuth ¶ added in v0.2.1
UserAuth looks up a user by given username. Then it compares passwords and returns user obj if given password is valid. Returns nil if password was wrong or user not found.
func (*BoltStore) UserDelete ¶ added in v0.2.1
UserDelete deletes the given user.
func (*BoltStore) UserGet ¶ added in v0.2.1
UserGet looks up a user by given username. Returns nil if user was not found.
func (*BoltStore) UserGetAll ¶ added in v0.2.1
UserGetAll returns all stored users.
type GaiaStore ¶ added in v0.2.1
type GaiaStore interface { Init() error CreatePipelinePut(createPipeline *gaia.CreatePipeline) error CreatePipelineGet() (listOfPipelines []gaia.CreatePipeline, err error) PipelinePut(pipeline *gaia.Pipeline) error PipelineGet(id int) (pipeline *gaia.Pipeline, err error) PipelineGetByName(name string) (pipline *gaia.Pipeline, err error) PipelineGetRunHighestID(pipeline *gaia.Pipeline) (id int, err error) PipelinePutRun(r *gaia.PipelineRun) error PipelineGetScheduled(limit int) ([]*gaia.PipelineRun, error) PipelineGetRunByPipelineIDAndID(pipelineid int, runid int) (*gaia.PipelineRun, error) PipelineGetAllRuns(pipelineID int) ([]gaia.PipelineRun, error) PipelineGetLatestRun(pipelineID int) (*gaia.PipelineRun, error) PipelineDelete(id int) error UserPut(u *gaia.User, encryptPassword bool) error UserAuth(u *gaia.User, updateLastLogin bool) (*gaia.User, error) UserGet(username string) (*gaia.User, error) UserGetAll() ([]gaia.User, error) UserDelete(u string) error }
GaiaStore is the interface that defines methods needed to store pipeline and user related information.