Documentation ¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) GetAppBuildsByInputDigest(appName, totalInputDigest string) ([]*storage.Build, error)
- func (c *Client) GetApps() ([]*storage.Application, error)
- func (c *Client) GetBuildWithoutInputs(id int) (*storage.Build, error)
- func (c *Client) GetLatestBuildByDigest(appName, totalInputDigest string) (*storage.Build, error)
- func (c *Client) GetSameTotalInputDigestsForAppBuilds(appName string, startTs time.Time) ([]string, error)
- func (c *Client) Save(b *storage.Build) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a postgres storage client
func (*Client) GetAppBuildsByInputDigest ¶
func (c *Client) GetAppBuildsByInputDigest(appName, totalInputDigest string) ([]*storage.Build, error)
GetAppBuildsByInputDigest returns all builds of an application with the given totalInputDigest. If no matching entries are found it returns storage.ErrNotExist
func (*Client) GetApps ¶
func (c *Client) GetApps() ([]*storage.Application, error)
GetApps returns all application records ordered by Name
func (*Client) GetBuildWithoutInputs ¶
GetBuildWithoutInputs retrieves a build from the database
func (*Client) GetLatestBuildByDigest ¶
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 sql.ErrNoRows is returned
func (*Client) GetSameTotalInputDigestsForAppBuilds ¶
func (c *Client) GetSameTotalInputDigestsForAppBuilds(appName string, startTs time.Time) ([]string, 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.