Documentation ¶
Index ¶
- Constants
- type DatabaseClient
- type PostgresClient
- func (p *PostgresClient) AllArtifacts(repoID int64, branch string) ([]*structs.Artifact, error)
- func (p *PostgresClient) AllBuilds(repoID int64, branch string) ([]*structs.Build, error)
- func (p *PostgresClient) CountBuildsInRepoWithBranch(repoID int64, branch string) (int, error)
- func (p *PostgresClient) CreateSchema() error
- func (p *PostgresClient) Disconnect() error
- func (p *PostgresClient) FindArtifactByBuildID(buildID int64) (*structs.Artifact, error)
- func (p *PostgresClient) FindArtifactByID(id int64) (*structs.Artifact, error)
- func (p *PostgresClient) FindBuildByID(buildID int64) (*structs.Build, error)
- func (p *PostgresClient) InsertArtifact(artifact *structs.Artifact) error
- func (p *PostgresClient) InsertBuild(build *structs.Build) error
Constants ¶
View Source
const (
ConnectAttempts = 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseClient ¶
type DatabaseClient interface { CreateSchema() error InsertBuild(build *structs.Build) error AllBuilds(repoID int64, branch string) ([]*structs.Build, error) CountBuildsInRepoWithBranch(repoID int64, branch string) (int, error) FindBuildByID(buildID int64) (*structs.Build, error) InsertArtifact(artifact *structs.Artifact) error AllArtifacts(repoID int64, branch string) ([]*structs.Artifact, error) FindArtifactByBuildID(buildID int64) (*structs.Artifact, error) FindArtifactByID(id int64) (*structs.Artifact, error) Disconnect() error }
type PostgresClient ¶
type PostgresClient struct {
// contains filtered or unexported fields
}
func NewPostgresClient ¶
func NewPostgresClient(config config.PostgresConfig) *PostgresClient
func (*PostgresClient) AllArtifacts ¶
func (*PostgresClient) CountBuildsInRepoWithBranch ¶
func (p *PostgresClient) CountBuildsInRepoWithBranch(repoID int64, branch string) (int, error)
func (*PostgresClient) CreateSchema ¶
func (p *PostgresClient) CreateSchema() error
func (*PostgresClient) Disconnect ¶
func (p *PostgresClient) Disconnect() error
func (*PostgresClient) FindArtifactByBuildID ¶
func (p *PostgresClient) FindArtifactByBuildID(buildID int64) (*structs.Artifact, error)
func (*PostgresClient) FindArtifactByID ¶
func (p *PostgresClient) FindArtifactByID(id int64) (*structs.Artifact, error)
func (*PostgresClient) FindBuildByID ¶
func (p *PostgresClient) FindBuildByID(buildID int64) (*structs.Build, error)
func (*PostgresClient) InsertArtifact ¶
func (p *PostgresClient) InsertArtifact(artifact *structs.Artifact) error
func (*PostgresClient) InsertBuild ¶
func (p *PostgresClient) InsertBuild(build *structs.Build) error
Click to show internal directories.
Click to hide internal directories.