Documentation ¶
Index ¶
- type Client
- func (c *Client) BuildExist(id int) (bool, error)
- func (c *Client) Close()
- func (c *Client) GetApps() ([]*storage.Application, error)
- func (c *Client) GetBuildOutputs(buildID int) ([]*storage.Output, error)
- func (c *Client) GetBuildWithoutInputsOutputs(id int) (*storage.BuildWithDuration, error)
- func (c *Client) GetBuildsWithoutInputsOutputs(filters []*storage.Filter, sorters []*storage.Sorter) ([]*storage.BuildWithDuration, error)
- func (c *Client) GetLatestBuildByDigest(appName, totalInputDigest string) (*storage.BuildWithDuration, error)
- func (c *Client) GetSameTotalInputDigestsForAppBuilds(appName string, startTs time.Time) (map[string][]int, error)
- func (c *Client) Init() error
- func (c *Client) Save(b *storage.Build) error
- type Query
- type RowScanFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a postgres storage client
func (*Client) BuildExist ¶ added in v0.11.1
BuildExist returns true if the build with the given ID exist.
func (*Client) GetApps ¶
func (c *Client) GetApps() ([]*storage.Application, error)
GetApps returns all application records ordered by Name
func (*Client) GetBuildOutputs ¶ added in v0.9.0
GetBuildOutputs returns build outputs
func (*Client) GetBuildWithoutInputsOutputs ¶ added in v0.11.1
func (c *Client) GetBuildWithoutInputsOutputs(id int) (*storage.BuildWithDuration, error)
GetBuildWithoutInputsOutputs retrieves a single build from the database
func (*Client) GetBuildsWithoutInputsOutputs ¶ added in v0.11.1
func (c *Client) GetBuildsWithoutInputsOutputs(filters []*storage.Filter, sorters []*storage.Sorter) ( []*storage.BuildWithDuration, error)
GetBuildsWithoutInputsOutputs returns builds from the database
func (*Client) GetLatestBuildByDigest ¶
func (c *Client) GetLatestBuildByDigest(appName, totalInputDigest string) (*storage.BuildWithDuration, error)
GetLatestBuildByDigest returns the build id of a build for the application with the passed digest. If multiple builds exist, the one with the lastest stop_timestamp is returned. Inputs are not fetched from the database. If no builds exist storage.ErrNotExist is returned
func (*Client) GetSameTotalInputDigestsForAppBuilds ¶
func (c *Client) GetSameTotalInputDigestsForAppBuilds(appName string, startTs time.Time) (map[string][]int, error)
GetSameTotalInputDigestsForAppBuilds finds TotalInputDigests that are the same for builds of an app with a build start time not before startTs If not builds with the same totalInputDigest is found, an empty slice is returned.
type RowScanFunc ¶ added in v0.9.0
RowScanFunc should run rows.Scan and return a value for that row