store

package
v0.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipelineTypeRelease     = PipelineType("release")
	PipelineTypePullRequest = PipelineType("pullrequest")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	Owner          string
	Repository     string
	Version        string
	Environment    string
	DeploymentTime time.Time
}

func (Deployment) String

func (d Deployment) String() string

type DeploymentStore

type DeploymentStore struct {
	// contains filtered or unexported fields
}

func (*DeploymentStore) Add

func (*DeploymentStore) Migrations

func (s *DeploymentStore) Migrations() []migration.Func

func (*DeploymentStore) TableName

func (s *DeploymentStore) TableName() string

type Pipeline

type Pipeline struct {
	Type        PipelineType
	Owner       string
	Repository  string
	PullRequest int
	Context     string
	Build       int
	Status      string
	Author      string
	StartTime   time.Time
	EndTime     time.Time
	Duration    time.Duration
}

type PipelineStore

type PipelineStore struct {
	// contains filtered or unexported fields
}

func (*PipelineStore) Add

func (s *PipelineStore) Add(ctx context.Context, p Pipeline) error

func (*PipelineStore) Migrations

func (s *PipelineStore) Migrations() []migration.Func

func (*PipelineStore) TableName

func (s *PipelineStore) TableName() string

type PipelineType

type PipelineType string

type PullRequest

type PullRequest struct {
	Owner              string
	Repository         string
	PullRequest        int
	Author             string
	State              string
	Reviews            int
	Reviewers          []string
	CreationTime       *time.Time
	ReadyForReviewTime *time.Time
	ApprovedTime       *time.Time
	TimeToReview       time.Duration
	MergedTime         *time.Time
	TimeToMerge        time.Duration
}

func (*PullRequest) CalculateDurations

func (pr *PullRequest) CalculateDurations()

func (*PullRequest) MergeWith

func (pr *PullRequest) MergeWith(other PullRequest)

func (PullRequest) String

func (pr PullRequest) String() string

type PullRequestStore

type PullRequestStore struct {
	// contains filtered or unexported fields
}

func (*PullRequestStore) Add

func (*PullRequestStore) Migrations

func (s *PullRequestStore) Migrations() []migration.Func

func (*PullRequestStore) TableName

func (s *PullRequestStore) TableName() string

type Release

type Release struct {
	Owner        string
	Repository   string
	Version      string
	Contributors []string
	ReleaseTime  time.Time
}

func (Release) String

func (r Release) String() string

type ReleaseStore

type ReleaseStore struct {
	// contains filtered or unexported fields
}

func (*ReleaseStore) Add

func (s *ReleaseStore) Add(ctx context.Context, r Release) error

func (*ReleaseStore) Migrations

func (s *ReleaseStore) Migrations() []migration.Func

func (*ReleaseStore) TableName

func (s *ReleaseStore) TableName() string

type Store

type Store struct {
	Pipelines    *PipelineStore
	PullRequests *PullRequestStore
	Releases     *ReleaseStore
	Deployments  *DeploymentStore
}

func New

func New(ctx context.Context, connPool *pgxpool.Pool) (*Store, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL