Documentation ¶
Index ¶
- type Store
- func (s *Store) CreatePipelineGet() ([]gaia.CreatePipeline, error)
- func (s *Store) CreatePipelinePut(p *gaia.CreatePipeline) error
- func (s *Store) Init() error
- func (s *Store) PipelineGet(id int) (*gaia.Pipeline, error)
- func (s *Store) PipelineGetAllRuns(pipelineID int) ([]gaia.PipelineRun, error)
- func (s *Store) PipelineGetByName(n string) (*gaia.Pipeline, error)
- func (s *Store) PipelineGetLatestRun(pipelineID int) (*gaia.PipelineRun, error)
- func (s *Store) PipelineGetRunByPipelineIDAndID(pipelineid int, runid int) (*gaia.PipelineRun, error)
- func (s *Store) PipelineGetRunHighestID(p *gaia.Pipeline) (int, error)
- func (s *Store) PipelineGetScheduled(limit int) ([]*gaia.PipelineRun, error)
- func (s *Store) PipelinePut(p *gaia.Pipeline) error
- func (s *Store) PipelinePutRun(r *gaia.PipelineRun) error
- func (s *Store) UserAuth(u *gaia.User, updateLastLogin bool) (*gaia.User, error)
- func (s *Store) UserDelete(u string) error
- func (s *Store) UserGet(username string) (*gaia.User, error)
- func (s *Store) UserGetAll() ([]gaia.User, error)
- func (s *Store) UserPut(u *gaia.User, encryptPassword bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents the access type for store
func (*Store) CreatePipelineGet ¶
func (s *Store) CreatePipelineGet() ([]gaia.CreatePipeline, error)
CreatePipelineGet returns all available create pipeline objects in the store.
func (*Store) CreatePipelinePut ¶
func (s *Store) CreatePipelinePut(p *gaia.CreatePipeline) error
CreatePipelinePut adds a pipeline which is not yet compiled but is about to.
func (*Store) Init ¶
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 (*Store) PipelineGet ¶
PipelineGet gets a pipeline by given id.
func (*Store) PipelineGetAllRuns ¶
func (s *Store) PipelineGetAllRuns(pipelineID int) ([]gaia.PipelineRun, error)
PipelineGetAllRuns looks for all pipeline runs by the given pipeline id.
func (*Store) PipelineGetByName ¶
PipelineGetByName looks up a pipeline by the given name. Returns nil if pipeline was not found.
func (*Store) PipelineGetLatestRun ¶
func (s *Store) PipelineGetLatestRun(pipelineID int) (*gaia.PipelineRun, error)
PipelineGetLatestRun returns the latest run by the given pipeline id.
func (*Store) PipelineGetRunByPipelineIDAndID ¶
func (s *Store) PipelineGetRunByPipelineIDAndID(pipelineid int, runid int) (*gaia.PipelineRun, error)
PipelineGetRunByPipelineIDAndID looks for pipeline run by given pipeline id and run id.
func (*Store) PipelineGetRunHighestID ¶
PipelineGetRunHighestID looks for the highest public id for the given pipeline.
func (*Store) PipelineGetScheduled ¶
func (s *Store) PipelineGetScheduled(limit int) ([]*gaia.PipelineRun, error)
PipelineGetScheduled returns the scheduled pipelines with a return limit.
func (*Store) PipelinePut ¶
PipelinePut puts a pipeline into the store. On persist, the pipeline will get a unique id.
func (*Store) PipelinePutRun ¶
func (s *Store) 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 (*Store) UserAuth ¶
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 (*Store) UserDelete ¶
UserDelete deletes the given user.
func (*Store) UserGet ¶
UserGet looks up a user by given username. Returns nil if user was not found.
func (*Store) UserGetAll ¶
UserGetAll returns all stored users.