deploy

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDeploy = errors.New("no deploys in channel")
)

Functions

This section is empty.

Types

type BoltDBStore added in v1.1.0

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

func NewBoltDBStore added in v1.1.0

func NewBoltDBStore(path string) (*BoltDBStore, error)

func (*BoltDBStore) All added in v1.1.2

func (s *BoltDBStore) All(key string) []Deploy

func (*BoltDBStore) Get added in v1.1.0

func (s *BoltDBStore) Get(key string) (deploy Deploy, ok bool)

func (*BoltDBStore) Set added in v1.1.0

func (s *BoltDBStore) Set(key string, d Deploy)

func (*BoltDBStore) Since added in v1.1.5

func (s *BoltDBStore) Since(key string, startTime time.Time) []Deploy

type ChannelDeploys added in v1.1.0

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

func NewChannelDeploys added in v1.1.0

func NewChannelDeploys(store Store) *ChannelDeploys

func (*ChannelDeploys) Abort added in v1.1.5

func (repo *ChannelDeploys) Abort(channelID, reason string) (Deploy, bool)

func (*ChannelDeploys) Current added in v1.1.0

func (repo *ChannelDeploys) Current(channelID string) (Deploy, bool)

func (*ChannelDeploys) Finish added in v1.1.0

func (repo *ChannelDeploys) Finish(channelID string) (Deploy, bool)

func (*ChannelDeploys) Start added in v1.1.0

func (repo *ChannelDeploys) Start(channelID string, d Deploy) (Deploy, bool)

type Deploy

type Deploy struct {
	User         slack.User
	Subject      string
	StartedAt    time.Time
	FinishedAt   time.Time
	Aborted      bool
	AbortReason  string
	PullRequests []PullRequestReference
	Subscribers  []UserReference
}

func New added in v1.1.0

func New(user slack.User, subject string) Deploy

func (*Deploy) Abort added in v1.1.5

func (d *Deploy) Abort(reason string)

func (Deploy) Equal added in v1.1.5

func (d1 Deploy) Equal(d2 Deploy) bool

func (*Deploy) Finish added in v1.1.0

func (d *Deploy) Finish()

func (Deploy) Finished added in v1.1.5

func (d Deploy) Finished() bool

func (*Deploy) Start added in v1.1.0

func (d *Deploy) Start() bool

type InMemoryStore added in v1.1.0

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

func NewInMemoryStore added in v1.1.0

func NewInMemoryStore() *InMemoryStore

func (*InMemoryStore) All added in v1.1.2

func (s *InMemoryStore) All(key string) []Deploy

func (*InMemoryStore) Get added in v1.1.0

func (s *InMemoryStore) Get(key string) (d Deploy, ok bool)

func (*InMemoryStore) Set added in v1.1.0

func (s *InMemoryStore) Set(key string, d Deploy)

func (*InMemoryStore) Since added in v1.1.5

func (s *InMemoryStore) Since(key string, startTime time.Time) []Deploy

type PullRequestReference added in v1.1.5

type PullRequestReference struct {
	ID         string
	Repository string
}

func FindPullRequestReferences added in v1.1.5

func FindPullRequestReferences(s string) []PullRequestReference

type Repository added in v1.1.2

type Repository interface {
	All(key string) []Deploy
	Since(key string, startTime time.Time) []Deploy
}

type Store

type Store interface {
	Get(key string) (d Deploy, ok bool)
	Set(key string, d Deploy)
}

type UserReference added in v1.1.5

type UserReference struct {
	ID   string
	Name string
}

func FindUserReferences added in v1.1.5

func FindUserReferences(s string) []UserReference

Jump to

Keyboard shortcuts

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