stores

package
v0.0.0-...-a8e4d9d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package stores provides storage objects, they all have a trivial interface for finding by UUID, updateing and deleting

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = fmt.Errorf("KeyValueStore: nil")

Functions

This section is empty.

Types

type ActivitySink

type ActivitySink interface {
	EnqueueActivity(activity *domain.Activity, userUuid *string)
}

type Braintree

type Braintree interface {
	FindAllPlans() ([]*braintree.Plan, error)
}

type BraintreeAPI

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

func NewBraintreeAPI

func NewBraintreeAPI(client *braintree.Braintree) *BraintreeAPI

func (*BraintreeAPI) FindAllPlans

func (self *BraintreeAPI) FindAllPlans() ([]*braintree.Plan, error)

type CachedInvitationStore

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

func NewCachedInvitationStore

func NewCachedInvitationStore(onMiss domain.InvitationStore) *CachedInvitationStore

func (CachedInvitationStore) FindByUserAndProjectUuid

func (store CachedInvitationStore) FindByUserAndProjectUuid(userId, projectId string) (*domain.Invitation, error)

func (*CachedInvitationStore) Log

func (store *CachedInvitationStore) Log() logger.Logger

func (*CachedInvitationStore) SetLogger

func (store *CachedInvitationStore) SetLogger(l logger.Logger)

type CachedOrganizationStore

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

func NewCachedOrganizationStore

func NewCachedOrganizationStore(around domain.OrganizationStore) *CachedOrganizationStore

func (*CachedOrganizationStore) FindByProjectUuid

func (store *CachedOrganizationStore) FindByProjectUuid(projectUuid string) (*domain.Organization, error)

func (*CachedOrganizationStore) FindByUuid

func (store *CachedOrganizationStore) FindByUuid(organizationUuid string) (*domain.Organization, error)

func (*CachedOrganizationStore) Log

func (store *CachedOrganizationStore) Log() logger.Logger

func (*CachedOrganizationStore) SetLogger

func (store *CachedOrganizationStore) SetLogger(l logger.Logger)

type CachedProjectStore

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

func NewCachedProjectStore

func NewCachedProjectStore(around domain.ProjectStore) *CachedProjectStore

func (*CachedProjectStore) FindByEnvironmentUuid

func (store *CachedProjectStore) FindByEnvironmentUuid(environmentUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByJobUuid

func (store *CachedProjectStore) FindByJobUuid(jobUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByMemberUuid

func (store *CachedProjectStore) FindByMemberUuid(memberUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByNotificationRule

func (store *CachedProjectStore) FindByNotificationRule(notifierUuid, notifierType string) (*domain.Project, error)

func (*CachedProjectStore) FindByNotifierUuid

func (store *CachedProjectStore) FindByNotifierUuid(notifierUuid, notifierType string) (*domain.Project, error)

func (*CachedProjectStore) FindByOrganizationUuid

func (store *CachedProjectStore) FindByOrganizationUuid(organizationUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByRepositoryUuid

func (store *CachedProjectStore) FindByRepositoryUuid(repositoryUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByTaskUuid

func (store *CachedProjectStore) FindByTaskUuid(taskUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByUuid

func (store *CachedProjectStore) FindByUuid(projectUuid string) (*domain.Project, error)

func (*CachedProjectStore) FindByWebhookUuid

func (store *CachedProjectStore) FindByWebhookUuid(webhookUuid string) (*domain.Project, error)

func (*CachedProjectStore) Log

func (store *CachedProjectStore) Log() logger.Logger

func (*CachedProjectStore) SetLogger

func (store *CachedProjectStore) SetLogger(l logger.Logger)

type CachedUserBlockStore

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

func NewCachedUserBlockStore

func NewCachedUserBlockStore(next *DbUserBlockStore) *CachedUserBlockStore

func (*CachedUserBlockStore) Log

func (self *CachedUserBlockStore) Log() logger.Logger

func (*CachedUserBlockStore) SetLogger

func (self *CachedUserBlockStore) SetLogger(l logger.Logger)

func (*CachedUserBlockStore) UserIsBlocked

func (self *CachedUserBlockStore) UserIsBlocked(userUuid string) (bool, error)

type CachedUserStore

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

func NewCachedUserStore

func NewCachedUserStore(around domain.UserStore) *CachedUserStore

func (*CachedUserStore) FindAllSubscribers

func (store *CachedUserStore) FindAllSubscribers(watchableId, event string) ([]*domain.User, error)

func (*CachedUserStore) FindByUuid

func (store *CachedUserStore) FindByUuid(userUuid string) (*domain.User, error)

func (*CachedUserStore) Log

func (store *CachedUserStore) Log() logger.Logger

func (*CachedUserStore) SetLogger

func (store *CachedUserStore) SetLogger(l logger.Logger)

type DataSource

type DataSource interface {
	Select(dest interface{}, query string, args ...interface{}) error
	Get(dest interface{}, query string, args ...interface{}) error
}

type DbActivityStore

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

func NewDbActivityStore

func NewDbActivityStore(tx *sqlx.Tx) *DbActivityStore

func (*DbActivityStore) All

func (self *DbActivityStore) All(handler func(*domain.Activity) error) error

func (*DbActivityStore) AllByNameSince

func (self *DbActivityStore) AllByNameSince(activityNames []string, since time.Time, handler func(*domain.Activity) error) error

func (*DbActivityStore) AllByProjectSince

func (self *DbActivityStore) AllByProjectSince(projectUuid string, since time.Time, handler func(*domain.Activity) error) error

func (*DbActivityStore) AllByUser

func (self *DbActivityStore) AllByUser(userUuid string, handler func(*domain.Activity) error) error

func (*DbActivityStore) AllSince

func (self *DbActivityStore) AllSince(since time.Time, handler func(*domain.Activity) error) error

func (*DbActivityStore) FindActivityById

func (self *DbActivityStore) FindActivityById(id int) (*domain.Activity, error)

func (*DbActivityStore) FindActivityByNameAndPayloadUuid

func (self *DbActivityStore) FindActivityByNameAndPayloadUuid(name string, payloadUuid string) (*domain.Activity, error)

func (*DbActivityStore) Log

func (self *DbActivityStore) Log() logger.Logger

func (*DbActivityStore) SetLogger

func (self *DbActivityStore) SetLogger(l logger.Logger)

func (*DbActivityStore) Store

func (self *DbActivityStore) Store(activity *domain.Activity) error

type DbBillingEventStore

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

func NewDbBillingEventStore

func NewDbBillingEventStore(tx *sqlx.Tx) *DbBillingEventStore

func (*DbBillingEventStore) Create

func (store *DbBillingEventStore) Create(event *domain.BillingEvent) (uuid string, err error)

func (*DbBillingEventStore) FindAllByOrganizationUuid

func (store *DbBillingEventStore) FindAllByOrganizationUuid(organizationUuid string) ([]*domain.BillingEvent, error)

func (*DbBillingEventStore) Log

func (store *DbBillingEventStore) Log() logger.Logger

func (*DbBillingEventStore) ReplayAllAfter

func (store *DbBillingEventStore) ReplayAllAfter(fn func(*domain.BillingEvent), after time.Time) error

func (*DbBillingEventStore) SetLogger

func (store *DbBillingEventStore) SetLogger(l logger.Logger)

type DbBillingHistoryStore

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

func NewDbBillingHistoryStore

func NewDbBillingHistoryStore(tx *sqlx.Tx, cache KeyValueStore) *DbBillingHistoryStore

func (*DbBillingHistoryStore) CacheHistory

func (self *DbBillingHistoryStore) CacheHistory(history *domain.BillingHistory)

CacheHistory caches history in a key value store. Errors are logged but not treated as fatal, because information can be recalculated in that case.

func (*DbBillingHistoryStore) Load

Load returns the aggregation of all billing events in the form of a billing history.

func (*DbBillingHistoryStore) LoadFromCache

func (self *DbBillingHistoryStore) LoadFromCache() *domain.BillingHistory

LoadFromCache loads the cached version of the billing history. If there is an error retrieving the cached version, a new empty instance is returned.

func (*DbBillingHistoryStore) Log

func (self *DbBillingHistoryStore) Log() logger.Logger

func (*DbBillingHistoryStore) SetLogger

func (self *DbBillingHistoryStore) SetLogger(l logger.Logger)

type DbBillingPlanStore

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

func NewDbBillingPlanStore

func NewDbBillingPlanStore(tx *sqlx.Tx) *DbBillingPlanStore

func (*DbBillingPlanStore) FindAll

func (self *DbBillingPlanStore) FindAll() ([]*domain.BillingPlan, error)

func (*DbBillingPlanStore) FindByUuid

func (self *DbBillingPlanStore) FindByUuid(uuid string) (*domain.BillingPlan, error)

type DbDeliveryStore

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

func NewDbDeliveryStore

func NewDbDeliveryStore(tx *sqlx.Tx) *DbDeliveryStore

func (*DbDeliveryStore) Create

func (store *DbDeliveryStore) Create(delivery *domain.Delivery) (string, error)

func (*DbDeliveryStore) CreateAt

func (store *DbDeliveryStore) CreateAt(delivery *domain.Delivery, at time.Time) (string, error)

func (*DbDeliveryStore) FindByUuid

func (store *DbDeliveryStore) FindByUuid(uuid string) (*domain.Delivery, error)

func (*DbDeliveryStore) FindByWebhookUuid

func (store *DbDeliveryStore) FindByWebhookUuid(uuid string) ([]*domain.Delivery, error)

func (*DbDeliveryStore) Log

func (store *DbDeliveryStore) Log() logger.Logger

func (*DbDeliveryStore) SetLogger

func (store *DbDeliveryStore) SetLogger(l logger.Logger)

type DbEmailNotifierStore

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

func NewDbEmailNotifierStore

func NewDbEmailNotifierStore(tx *sqlx.Tx) *DbEmailNotifierStore

func (*DbEmailNotifierStore) ArchiveByUuid

func (store *DbEmailNotifierStore) ArchiveByUuid(uuid string) error

func (*DbEmailNotifierStore) Create

func (store *DbEmailNotifierStore) Create(subject *domain.EmailNotifier) (string, error)

func (*DbEmailNotifierStore) FindAllByProjectUuid

func (store *DbEmailNotifierStore) FindAllByProjectUuid(projectUuid string) ([]*domain.EmailNotifier, error)

func (*DbEmailNotifierStore) FindByRecipient

func (store *DbEmailNotifierStore) FindByRecipient(uuid string) (*domain.EmailNotifier, error)

func (*DbEmailNotifierStore) FindByUuid

func (store *DbEmailNotifierStore) FindByUuid(uuid string) (*domain.EmailNotifier, error)

func (*DbEmailNotifierStore) Log

func (store *DbEmailNotifierStore) Log() logger.Logger

func (*DbEmailNotifierStore) SetLogger

func (store *DbEmailNotifierStore) SetLogger(l logger.Logger)

func (*DbEmailNotifierStore) Update

func (store *DbEmailNotifierStore) Update(subject *domain.EmailNotifier) error

type DbEnvironmentStore

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

func NewDbEnvironmentStore

func NewDbEnvironmentStore(tx *sqlx.Tx) *DbEnvironmentStore

func (DbEnvironmentStore) ArchiveByUuid

func (store DbEnvironmentStore) ArchiveByUuid(uuid string) error

func (DbEnvironmentStore) Create

func (store DbEnvironmentStore) Create(env *domain.Environment) (string, error)

func (DbEnvironmentStore) FindAll

func (store DbEnvironmentStore) FindAll() ([]*domain.Environment, error)

func (DbEnvironmentStore) FindAllByProjectUuid

func (store DbEnvironmentStore) FindAllByProjectUuid(projUuid string) ([]*domain.Environment, error)

func (DbEnvironmentStore) FindByJobUuid

func (store DbEnvironmentStore) FindByJobUuid(jobUuid string) (*domain.Environment, error)

func (DbEnvironmentStore) FindByName

func (store DbEnvironmentStore) FindByName(name string) (*domain.Environment, error)

func (DbEnvironmentStore) FindByUuid

func (store DbEnvironmentStore) FindByUuid(uuid string) (*domain.Environment, error)

func (*DbEnvironmentStore) Log

func (self *DbEnvironmentStore) Log() logger.Logger

func (*DbEnvironmentStore) SetLogger

func (self *DbEnvironmentStore) SetLogger(l logger.Logger)

func (DbEnvironmentStore) Update

func (store DbEnvironmentStore) Update(env *domain.Environment) error

type DbGitTriggerStore

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

func NewDbGitTriggerStore

func NewDbGitTriggerStore(tx *sqlx.Tx) *DbGitTriggerStore

func (*DbGitTriggerStore) ArchiveByUuid

func (store *DbGitTriggerStore) ArchiveByUuid(uuid string) error

func (*DbGitTriggerStore) Create

func (store *DbGitTriggerStore) Create(subject *domain.GitTrigger) (string, error)

func (*DbGitTriggerStore) FindAllByJobUuid

func (store *DbGitTriggerStore) FindAllByJobUuid(jobUuid string) ([]*domain.GitTrigger, error)

func (*DbGitTriggerStore) FindByProjectUuid

func (store *DbGitTriggerStore) FindByProjectUuid(projectUuid string) ([]*domain.GitTrigger, error)

func (*DbGitTriggerStore) FindByUuid

func (store *DbGitTriggerStore) FindByUuid(uuid string) (*domain.GitTrigger, error)

func (*DbGitTriggerStore) Log

func (self *DbGitTriggerStore) Log() logger.Logger

func (*DbGitTriggerStore) SetLogger

func (self *DbGitTriggerStore) SetLogger(l logger.Logger)

func (*DbGitTriggerStore) Update

func (store *DbGitTriggerStore) Update(subject *domain.GitTrigger) error

type DbInvitationStore

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

func NewDbInvitationStore

func NewDbInvitationStore(tx *sqlx.Tx) *DbInvitationStore

func (*DbInvitationStore) Create

func (store *DbInvitationStore) Create(invitation *domain.Invitation) (string, error)

func (*DbInvitationStore) FindByUserAndProjectUuid

func (store *DbInvitationStore) FindByUserAndProjectUuid(userId, projectId string) (*domain.Invitation, error)

func (*DbInvitationStore) FindByUuid

func (store *DbInvitationStore) FindByUuid(uuid string) (*domain.Invitation, error)

func (*DbInvitationStore) Update

func (store *DbInvitationStore) Update(inv *domain.Invitation) error

type DbJobNotifierStore

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

func NewDbJobNotifierStore

func NewDbJobNotifierStore(tx *sqlx.Tx) *DbJobNotifierStore

func (*DbJobNotifierStore) ArchiveByUuid

func (store *DbJobNotifierStore) ArchiveByUuid(uuid string) error

func (*DbJobNotifierStore) Create

func (store *DbJobNotifierStore) Create(subject *domain.JobNotifier) (string, error)

func (*DbJobNotifierStore) FindAllByJobUuid

func (store *DbJobNotifierStore) FindAllByJobUuid(jobUuid string) ([]*domain.JobNotifier, error)

func (*DbJobNotifierStore) FindAllByProjectUuid

func (store *DbJobNotifierStore) FindAllByProjectUuid(projectUuid string) ([]*domain.JobNotifier, error)

func (*DbJobNotifierStore) FindAllByTriggeredJobUuid

func (store *DbJobNotifierStore) FindAllByTriggeredJobUuid(jobUuid string) ([]*domain.JobNotifier, error)

func (*DbJobNotifierStore) FindByUuid

func (store *DbJobNotifierStore) FindByUuid(uuid string) (*domain.JobNotifier, error)

func (*DbJobNotifierStore) Log

func (store *DbJobNotifierStore) Log() logger.Logger

func (*DbJobNotifierStore) SetLogger

func (store *DbJobNotifierStore) SetLogger(l logger.Logger)

func (*DbJobNotifierStore) Update

func (store *DbJobNotifierStore) Update(subject *domain.JobNotifier) error

type DbJobStore

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

func NewDbJobStore

func NewDbJobStore(tx *sqlx.Tx) *DbJobStore

func (DbJobStore) ArchiveByUuid

func (store DbJobStore) ArchiveByUuid(uuid string) error

func (DbJobStore) Create

func (store DbJobStore) Create(job *domain.Job) (string, error)

func (DbJobStore) FindAll

func (store DbJobStore) FindAll() ([]*domain.Job, error)

func (DbJobStore) FindAllByEnvironmentUuid

func (store DbJobStore) FindAllByEnvironmentUuid(envUuid string) ([]*domain.Job, error)

func (DbJobStore) FindAllByProjectUuid

func (store DbJobStore) FindAllByProjectUuid(projUuid string) ([]*domain.Job, error)

func (DbJobStore) FindAllByProjectUuids

func (store DbJobStore) FindAllByProjectUuids(projectUuids []string) ([]*domain.Job, error)

func (DbJobStore) FindAllByTaskUuid

func (store DbJobStore) FindAllByTaskUuid(taskUuid string) ([]*domain.Job, error)

func (DbJobStore) FindAllByUuids

func (store DbJobStore) FindAllByUuids(uuids []string) ([]*domain.Job, error)

func (DbJobStore) FindByName

func (store DbJobStore) FindByName(name string) (*domain.Job, error)

func (DbJobStore) FindByUuid

func (store DbJobStore) FindByUuid(uuid string) (*domain.Job, error)

func (DbJobStore) Log

func (self DbJobStore) Log() logger.Logger

func (DbJobStore) SetLogger

func (self DbJobStore) SetLogger(l logger.Logger)

func (DbJobStore) Update

func (store DbJobStore) Update(job *domain.Job) error

type DbLimitsStore

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

func NewDbLimitsStore

func NewDbLimitsStore(tx *sqlx.Tx) *DbLimitsStore

func (*DbLimitsStore) CacheLimits

func (self *DbLimitsStore) CacheLimits(organizationUuid string, limits *limits.Limits)

func (*DbLimitsStore) FindByOrganizationUuid

func (self *DbLimitsStore) FindByOrganizationUuid(organizationUuid string) (*limits.Limits, error)

FindByOrganizationUuid returns the limits for organization identified by organization uuid. This function makes uses of a cache when loading limits to avoid having to iterate over the full history.

func (*DbLimitsStore) LoadFromCache

func (self *DbLimitsStore) LoadFromCache(organizationUuid string) *limits.Limits

func (*DbLimitsStore) Log

func (self *DbLimitsStore) Log() logger.Logger

func (*DbLimitsStore) SetLogger

func (self *DbLimitsStore) SetLogger(l logger.Logger)

type DbNotificationRuleStore

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

func NewDbNotificationRuleStore

func NewDbNotificationRuleStore(tx *sqlx.Tx) *DbNotificationRuleStore

func (*DbNotificationRuleStore) ArchiveByUuid

func (store *DbNotificationRuleStore) ArchiveByUuid(uuid string) error

func (*DbNotificationRuleStore) Create

func (store *DbNotificationRuleStore) Create(subject *domain.NotificationRule) (string, error)

func (*DbNotificationRuleStore) FindAllByJobUuid

func (store *DbNotificationRuleStore) FindAllByJobUuid(jobUuid string) ([]*domain.NotificationRule, error)

func (*DbNotificationRuleStore) FindAllByNotifierUuid

func (store *DbNotificationRuleStore) FindAllByNotifierUuid(notifierUuid string) ([]*domain.NotificationRule, error)

func (*DbNotificationRuleStore) FindByNotifierAndJobUuidAndType

func (store *DbNotificationRuleStore) FindByNotifierAndJobUuidAndType(notifierUuid, jobUuid, notifierType string) (*domain.NotificationRule, error)

func (*DbNotificationRuleStore) FindByProjectUuid

func (store *DbNotificationRuleStore) FindByProjectUuid(projectUuid string) ([]*domain.NotificationRule, error)

func (*DbNotificationRuleStore) FindByUuid

func (store *DbNotificationRuleStore) FindByUuid(uuid string) (*domain.NotificationRule, error)

func (*DbNotificationRuleStore) Log

func (store *DbNotificationRuleStore) Log() logger.Logger

func (*DbNotificationRuleStore) SetLogger

func (store *DbNotificationRuleStore) SetLogger(l logger.Logger)

func (*DbNotificationRuleStore) Update

func (store *DbNotificationRuleStore) Update(subject *domain.NotificationRule) error

type DbNotifierStore

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

func NewDbNotifierStore

func NewDbNotifierStore(tx *sqlx.Tx) *DbNotifierStore

func (*DbNotifierStore) FindByUuidAndType

func (self *DbNotifierStore) FindByUuidAndType(uuid, typename string) (interface{}, error)

func (*DbNotifierStore) Log

func (self *DbNotifierStore) Log() logger.Logger

func (*DbNotifierStore) SetLogger

func (self *DbNotifierStore) SetLogger(l logger.Logger)

type DbOAuthTokenStore

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

func NewDbOAuthTokenStore

func NewDbOAuthTokenStore(tx *sqlx.Tx) *DbOAuthTokenStore

func (DbOAuthTokenStore) Create

func (store DbOAuthTokenStore) Create(token *domain.OAuthToken) (string, error)

func (DbOAuthTokenStore) DeleteByUuid

func (store DbOAuthTokenStore) DeleteByUuid(uuid string) error

func (DbOAuthTokenStore) FindAllByUserUuid

func (store DbOAuthTokenStore) FindAllByUserUuid(userUuid string) ([]*domain.OAuthToken, error)

func (DbOAuthTokenStore) FindByAccessToken

func (store DbOAuthTokenStore) FindByAccessToken(accessToken string) (*domain.OAuthToken, error)

func (DbOAuthTokenStore) FindByProviderAndUserUuid

func (store DbOAuthTokenStore) FindByProviderAndUserUuid(provider, userUuid string) (*domain.OAuthToken, error)

func (DbOAuthTokenStore) FindByRepositoryUUID

func (store DbOAuthTokenStore) FindByRepositoryUUID(repositoryUUID string) (*domain.OAuthToken, error)

func (DbOAuthTokenStore) FindByUserUuid

func (store DbOAuthTokenStore) FindByUserUuid(userUuid string) (*domain.OAuthToken, error)

func (DbOAuthTokenStore) FindByUuid

func (store DbOAuthTokenStore) FindByUuid(uuid string) (*domain.OAuthToken, error)

func (*DbOAuthTokenStore) Log

func (store *DbOAuthTokenStore) Log() logger.Logger

func (*DbOAuthTokenStore) SetLogger

func (store *DbOAuthTokenStore) SetLogger(l logger.Logger)

type DbOperationStore

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

func NewDbOperationStore

func NewDbOperationStore(tx *sqlx.Tx) *DbOperationStore

func (DbOperationStore) Create

func (store DbOperationStore) Create(op *domain.Operation) (string, error)

func (DbOperationStore) FindAll

func (store DbOperationStore) FindAll() ([]*domain.Operation, error)

func (DbOperationStore) FindAllByJobUuid

func (store DbOperationStore) FindAllByJobUuid(jobUuid string) ([]*domain.Operation, error)

func (DbOperationStore) FindAllByProjectUuid

func (store DbOperationStore) FindAllByProjectUuid(projectUuid string) ([]*domain.Operation, error)

func (DbOperationStore) FindAllByRepositoryUuid

func (store DbOperationStore) FindAllByRepositoryUuid(repoUuid string) ([]*domain.Operation, error)

func (DbOperationStore) FindAllByScheduleUuid

func (store DbOperationStore) FindAllByScheduleUuid(scheduleUuid string) ([]*domain.Operation, error)

func (DbOperationStore) FindByUuid

func (store DbOperationStore) FindByUuid(uuid string) (*domain.Operation, error)

func (DbOperationStore) FindMostRecentUserOperationByProjectUuid

func (store DbOperationStore) FindMostRecentUserOperationByProjectUuid(projectUuid string) (*domain.Operation, error)

func (*DbOperationStore) FindPreviousOperation

func (store *DbOperationStore) FindPreviousOperation(currentOperationUuid string) (*domain.Operation, error)

func (DbOperationStore) FindRecentByJobUuid

func (store DbOperationStore) FindRecentByJobUuid(n int, jobUuid string) ([]*domain.Operation, error)

func (DbOperationStore) FindRecentByProjectUuid

func (store DbOperationStore) FindRecentByProjectUuid(projectUuid string) ([]*domain.Operation, error)

func (*DbOperationStore) Log

func (store *DbOperationStore) Log() logger.Logger

func (*DbOperationStore) MarkAsCanceled

func (store *DbOperationStore) MarkAsCanceled(operationUuid string) error

func (*DbOperationStore) MarkAsFailed

func (store *DbOperationStore) MarkAsFailed(operationUuid string) error

func (*DbOperationStore) MarkAsFinished

func (store *DbOperationStore) MarkAsFinished(operationUuid string) error

func (*DbOperationStore) MarkAsStarted

func (store *DbOperationStore) MarkAsStarted(operationUuid string) error

func (*DbOperationStore) MarkAsTimedOut

func (store *DbOperationStore) MarkAsTimedOut(operationUuid string) error

func (*DbOperationStore) MarkExitStatus

func (store *DbOperationStore) MarkExitStatus(operationUuid string, exitStatus int) error

func (*DbOperationStore) MarkFatalError

func (store *DbOperationStore) MarkFatalError(operationUuid, fatalErrorMessage string) error

func (*DbOperationStore) MarkGitLogs

func (store *DbOperationStore) MarkGitLogs(operationUuid string, logs *domain.GitLogs) error

func (*DbOperationStore) MarkRepositoryCheckouts

func (store *DbOperationStore) MarkRepositoryCheckouts(operationUuid string, checkouts *domain.RepositoryCheckouts) error

func (*DbOperationStore) MarkStatusLogs

func (store *DbOperationStore) MarkStatusLogs(operationUuid string, logs *domain.StatusLogs) error

func (*DbOperationStore) SetLogger

func (store *DbOperationStore) SetLogger(l logger.Logger)

type DbOrganizationMemberStore

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

func NewDbOrganizationMemberStore

func NewDbOrganizationMemberStore(tx *sqlx.Tx) *DbOrganizationMemberStore

func (*DbOrganizationMemberStore) FindAllByOrganizationUuid

func (store *DbOrganizationMemberStore) FindAllByOrganizationUuid(organizationUuid string) ([]*domain.OrganizationMember, error)

func (*DbOrganizationMemberStore) Log

func (*DbOrganizationMemberStore) SetLogger

func (store *DbOrganizationMemberStore) SetLogger(l logger.Logger)

type DbOrganizationMembershipStore

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

func NewDbOrganizationMembershipStore

func NewDbOrganizationMembershipStore(tx *sqlx.Tx) *DbOrganizationMembershipStore

func (DbOrganizationMembershipStore) Create

func (DbOrganizationMembershipStore) FindAllByOrganizationAndUserUuidGreaterThan

func (store DbOrganizationMembershipStore) FindAllByOrganizationAndUserUuidGreaterThan(orgUuid string, userUuid string, minMembershipType string) ([]*domain.OrganizationMembership, error)

func (DbOrganizationMembershipStore) FindAllByOrganizationUuid

func (store DbOrganizationMembershipStore) FindAllByOrganizationUuid(userUuid string) ([]*domain.OrganizationMembership, error)

func (DbOrganizationMembershipStore) FindAllByUserUuid

func (store DbOrganizationMembershipStore) FindAllByUserUuid(userUuid string) ([]*domain.OrganizationMembership, error)

func (DbOrganizationMembershipStore) FindByOrganizationAndUserUuids

func (store DbOrganizationMembershipStore) FindByOrganizationAndUserUuids(orgUuid string, userUuid string) (*domain.OrganizationMembership, error)

func (DbOrganizationMembershipStore) FindThroughProjectMemberships

func (store DbOrganizationMembershipStore) FindThroughProjectMemberships(organizationUuid, userUuid string) (*domain.OrganizationMembership, error)

func (*DbOrganizationMembershipStore) Log

func (*DbOrganizationMembershipStore) SetLogger

func (store *DbOrganizationMembershipStore) SetLogger(l logger.Logger)

type DbOrganizationStore

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

func NewDbOrganizationStore

func NewDbOrganizationStore(tx *sqlx.Tx) *DbOrganizationStore

func (DbOrganizationStore) ArchiveByUuid

func (store DbOrganizationStore) ArchiveByUuid(uuid string) error

func (DbOrganizationStore) Create

func (store DbOrganizationStore) Create(org *domain.Organization) (string, error)

func (DbOrganizationStore) DeleteByUuid

func (store DbOrganizationStore) DeleteByUuid(uuid string) error

func (DbOrganizationStore) FindAll

func (store DbOrganizationStore) FindAll() ([]*domain.Organization, error)

func (DbOrganizationStore) FindAllArchived

func (store DbOrganizationStore) FindAllArchived() ([]*domain.Organization, error)

func (DbOrganizationStore) FindAllByUserUuidThroughMemberships

func (store DbOrganizationStore) FindAllByUserUuidThroughMemberships(userUuid string) ([]*domain.Organization, error)

func (DbOrganizationStore) FindByProjectUuid

func (store DbOrganizationStore) FindByProjectUuid(projectUuid string) (*domain.Organization, error)

func (DbOrganizationStore) FindByUuid

func (store DbOrganizationStore) FindByUuid(uuid string) (*domain.Organization, error)

func (*DbOrganizationStore) Log

func (store *DbOrganizationStore) Log() logger.Logger

func (*DbOrganizationStore) SetLogger

func (store *DbOrganizationStore) SetLogger(l logger.Logger)

func (DbOrganizationStore) Update

func (store DbOrganizationStore) Update(org *domain.Organization) error

type DbProjectCardStore

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

func NewDbProjectCardStore

func NewDbProjectCardStore(tx *sqlx.Tx) *DbProjectCardStore

func (*DbProjectCardStore) FindAllByOrganizationUuid

func (self *DbProjectCardStore) FindAllByOrganizationUuid(organizationUuid string) ([]*domain.ProjectCard, error)

func (*DbProjectCardStore) FindByProjectUuid

func (self *DbProjectCardStore) FindByProjectUuid(projectUuid string) (*domain.ProjectCard, error)

func (*DbProjectCardStore) Log

func (self *DbProjectCardStore) Log() logger.Logger

func (*DbProjectCardStore) SetLogger

func (self *DbProjectCardStore) SetLogger(l logger.Logger)

type DbProjectMemberStore

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

func NewDbProjectMemberStore

func NewDbProjectMemberStore(tx *sqlx.Tx) *DbProjectMemberStore

func (*DbProjectMemberStore) FindAllByProjectUuid

func (store *DbProjectMemberStore) FindAllByProjectUuid(projectUuid string) ([]*domain.ProjectMember, error)

func (*DbProjectMemberStore) Log

func (store *DbProjectMemberStore) Log() logger.Logger

func (*DbProjectMemberStore) SetLogger

func (store *DbProjectMemberStore) SetLogger(l logger.Logger)

type DbProjectMembershipStore

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

func NewDbProjectMembershipStore

func NewDbProjectMembershipStore(tx *sqlx.Tx) *DbProjectMembershipStore

func (*DbProjectMembershipStore) ArchiveByUuid

func (store *DbProjectMembershipStore) ArchiveByUuid(uuid string) error

func (*DbProjectMembershipStore) Create

func (store *DbProjectMembershipStore) Create(membership *domain.ProjectMembership) (string, error)

func (*DbProjectMembershipStore) FindAllByProjectUuid

func (store *DbProjectMembershipStore) FindAllByProjectUuid(projectUuid string) ([]*domain.ProjectMembership, error)

func (*DbProjectMembershipStore) FindByUserAndProjectUuid

func (store *DbProjectMembershipStore) FindByUserAndProjectUuid(userUuid, projectUuid string) (*domain.ProjectMembership, error)

func (*DbProjectMembershipStore) FindByUuid

func (store *DbProjectMembershipStore) FindByUuid(uuid string) (*domain.ProjectMembership, error)

func (*DbProjectMembershipStore) Log

func (store *DbProjectMembershipStore) Log() logger.Logger

func (*DbProjectMembershipStore) SetLogger

func (store *DbProjectMembershipStore) SetLogger(l logger.Logger)

func (*DbProjectMembershipStore) Update

func (store *DbProjectMembershipStore) Update(membership *domain.ProjectMembership) error

type DbProjectStore

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

func NewDbProjectStore

func NewDbProjectStore(tx *sqlx.Tx) *DbProjectStore

func (DbProjectStore) ArchiveByUuid

func (store DbProjectStore) ArchiveByUuid(uuid string) error

func (DbProjectStore) Create

func (store DbProjectStore) Create(project *domain.Project) (string, error)

func (DbProjectStore) DeleteByUuid

func (store DbProjectStore) DeleteByUuid(uuid string) error

func (DbProjectStore) FindAll

func (store DbProjectStore) FindAll() ([]*domain.Project, error)

func (DbProjectStore) FindAllArchived

func (store DbProjectStore) FindAllArchived() ([]*domain.Project, error)

func (DbProjectStore) FindAllByOrganizationUuid

func (store DbProjectStore) FindAllByOrganizationUuid(orgUuid string) ([]*domain.Project, error)

func (DbProjectStore) FindAllByUserUuid

func (store DbProjectStore) FindAllByUserUuid(userUuid string) ([]*domain.Project, error)

func (DbProjectStore) FindAllByUserUuidOnlyThroughProjectMemberships

func (store DbProjectStore) FindAllByUserUuidOnlyThroughProjectMemberships(userUuid string) ([]*domain.Project, error)

func (DbProjectStore) FindAllIncludingArchived

func (store DbProjectStore) FindAllIncludingArchived() ([]*domain.Project, error)

func (DbProjectStore) FindByEnvironmentUuid

func (store DbProjectStore) FindByEnvironmentUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByJobUuid

func (store DbProjectStore) FindByJobUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByMemberUuid

func (store DbProjectStore) FindByMemberUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByNotificationRule

func (store DbProjectStore) FindByNotificationRule(notifierType string, notifierUuid string) (*domain.Project, error)

func (DbProjectStore) FindByNotifierUuid

func (store DbProjectStore) FindByNotifierUuid(uuid, notifierType string) (*domain.Project, error)

func (DbProjectStore) FindByOrganizationUuid

func (store DbProjectStore) FindByOrganizationUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByRepositoryUuid

func (store DbProjectStore) FindByRepositoryUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByTaskUuid

func (store DbProjectStore) FindByTaskUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByUuid

func (store DbProjectStore) FindByUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByUuidWithDeleted

func (store DbProjectStore) FindByUuidWithDeleted(uuid string) (*domain.Project, error)

func (DbProjectStore) FindByWebhookUuid

func (store DbProjectStore) FindByWebhookUuid(uuid string) (*domain.Project, error)

func (DbProjectStore) FindForAction

func (store DbProjectStore) FindForAction(table, uuid string) (*domain.Project, error)

func (DbProjectStore) Log

func (store DbProjectStore) Log() logger.Logger

func (DbProjectStore) SetLogger

func (store DbProjectStore) SetLogger(l logger.Logger)

func (DbProjectStore) Update

func (store DbProjectStore) Update(project *domain.Project) error

type DbRepositoryStore

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

func NewDbRepositoryStore

func NewDbRepositoryStore(tx *sqlx.Tx) *DbRepositoryStore

func (DbRepositoryStore) ArchiveByUuid

func (store DbRepositoryStore) ArchiveByUuid(uuid string) error

func (DbRepositoryStore) Create

func (store DbRepositoryStore) Create(repo *domain.Repository) (string, error)

func (DbRepositoryStore) FindAll

func (store DbRepositoryStore) FindAll() ([]*domain.Repository, error)

func (*DbRepositoryStore) FindAllByJobUuid

func (store *DbRepositoryStore) FindAllByJobUuid(jobUuid string) ([]*domain.Repository, error)

func (DbRepositoryStore) FindAllByProjectUuid

func (store DbRepositoryStore) FindAllByProjectUuid(projUuid string) ([]*domain.Repository, error)

func (DbRepositoryStore) FindAllByProjectUuidAndRepositoryName

func (store DbRepositoryStore) FindAllByProjectUuidAndRepositoryName(projUuid, repositoryName string) ([]*domain.Repository, error)

func (DbRepositoryStore) FindAllWithTriggers

func (store DbRepositoryStore) FindAllWithTriggers() ([]*domain.Repository, error)

func (*DbRepositoryStore) FindByOldestMetadata

func (self *DbRepositoryStore) FindByOldestMetadata() (*domain.Repository, error)

func (DbRepositoryStore) FindByUuid

func (store DbRepositoryStore) FindByUuid(uuid string) (*domain.Repository, error)

func (DbRepositoryStore) Log

func (self DbRepositoryStore) Log() logger.Logger

func (*DbRepositoryStore) MarkAsAccessible

func (store *DbRepositoryStore) MarkAsAccessible(uuid string, accessible bool) error

func (DbRepositoryStore) SetLogger

func (self DbRepositoryStore) SetLogger(l logger.Logger)

func (DbRepositoryStore) Update

func (store DbRepositoryStore) Update(repo *domain.Repository) error

func (DbRepositoryStore) UpdateMetadata

func (store DbRepositoryStore) UpdateMetadata(repositoryUuid string, metadata *domain.RepositoryMetaData) error

type DbScheduleStore

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

func NewDbScheduleStore

func NewDbScheduleStore(tx *sqlx.Tx) *DbScheduleStore

func (DbScheduleStore) ArchiveByUuid

func (store DbScheduleStore) ArchiveByUuid(uuid string) error

func (DbScheduleStore) Create

func (store DbScheduleStore) Create(schedule *domain.Schedule) (string, error)

func (DbScheduleStore) DeleteByUuid

func (store DbScheduleStore) DeleteByUuid(uuid string) error

func (DbScheduleStore) DisableSchedule

func (store DbScheduleStore) DisableSchedule(scheduleUuid, disabled string, disabledBecause *string) error

func (DbScheduleStore) FindAllByJobUuid

func (store DbScheduleStore) FindAllByJobUuid(jobUuid string) ([]*domain.Schedule, error)

func (DbScheduleStore) FindAllFutureSchedulesByProjectUuid

func (store DbScheduleStore) FindAllFutureSchedulesByProjectUuid(projectUuid string) ([]*domain.Schedule, error)

func (DbScheduleStore) FindAllRecurringByJobUuid

func (store DbScheduleStore) FindAllRecurringByJobUuid(jobUuid string) ([]*domain.Schedule, error)

func (DbScheduleStore) FindByUuid

func (store DbScheduleStore) FindByUuid(uuid string) (*domain.Schedule, error)

func (DbScheduleStore) FindInclArchivedByUuid

func (store DbScheduleStore) FindInclArchivedByUuid(uuid string) (*domain.Schedule, error)

func (DbScheduleStore) Update

func (store DbScheduleStore) Update(schedule *domain.Schedule) error

type DbScriptCardStore

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

func NewDbScriptCardStore

func NewDbScriptCardStore(tx DataSource) *DbScriptCardStore

func (*DbScriptCardStore) FindAllByProjectUuid

func (self *DbScriptCardStore) FindAllByProjectUuid(projectUuid string) ([]*domain.ScriptCard, error)

type DbSessionStore

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

func NewDbSessionStore

func NewDbSessionStore(tx *sqlx.Tx) *DbSessionStore

func (DbSessionStore) Create

func (store DbSessionStore) Create(session *domain.Session) (string, error)

func (DbSessionStore) DeleteByUuid

func (store DbSessionStore) DeleteByUuid(uuid string) error

func (DbSessionStore) ExpireAllSessionsForUserUuid

func (store DbSessionStore) ExpireAllSessionsForUserUuid(userUuid string) error

func (DbSessionStore) FindAllByUserUuid

func (store DbSessionStore) FindAllByUserUuid(userUuid string) ([]*domain.Session, error)

func (DbSessionStore) FindByUuid

func (store DbSessionStore) FindByUuid(uuid string) (*domain.Session, error)

func (DbSessionStore) InvalidateAllButMostRecentSessionForUser

func (store DbSessionStore) InvalidateAllButMostRecentSessionForUser(userUuid string) (int64, error)

func (DbSessionStore) Log

func (store DbSessionStore) Log() logger.Logger

func (DbSessionStore) MarkAsLoggedOut

func (store DbSessionStore) MarkAsLoggedOut(session *domain.Session) error

func (DbSessionStore) MarkAsValid

func (store DbSessionStore) MarkAsValid(session *domain.Session) error

func (DbSessionStore) SetLogger

func (store DbSessionStore) SetLogger(l logger.Logger)

type DbSlackNotifierStore

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

func NewDbSlackNotifierStore

func NewDbSlackNotifierStore(tx *sqlx.Tx) *DbSlackNotifierStore

func (*DbSlackNotifierStore) ArchiveByUuid

func (store *DbSlackNotifierStore) ArchiveByUuid(uuid string) error

func (*DbSlackNotifierStore) Create

func (store *DbSlackNotifierStore) Create(subject *domain.SlackNotifier) (string, error)

func (*DbSlackNotifierStore) FindByProjectUuid

func (store *DbSlackNotifierStore) FindByProjectUuid(uuid string) ([]*domain.SlackNotifier, error)

func (*DbSlackNotifierStore) FindByUuid

func (store *DbSlackNotifierStore) FindByUuid(uuid string) (*domain.SlackNotifier, error)

func (*DbSlackNotifierStore) Log

func (store *DbSlackNotifierStore) Log() logger.Logger

func (*DbSlackNotifierStore) SetLogger

func (store *DbSlackNotifierStore) SetLogger(l logger.Logger)

func (*DbSlackNotifierStore) Update

func (store *DbSlackNotifierStore) Update(subject *domain.SlackNotifier) error

type DbStencilStore

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

DbStencilStore is a convenience class for fulfilling many of stencil.Configuration's dependencies.

func NewDbStencilStore

func NewDbStencilStore(ss SecretKeyValueStore, tx *sqlx.Tx, bus ActivitySink) *DbStencilStore

func (*DbStencilStore) Create

func (self *DbStencilStore) Create(subject *domain.Stencil) error

func (*DbStencilStore) CreateEmailNotifier

func (self *DbStencilStore) CreateEmailNotifier(notifier *domain.EmailNotifier) error

func (*DbStencilStore) CreateEnvironment

func (self *DbStencilStore) CreateEnvironment(environment *domain.Environment) error

func (*DbStencilStore) CreateGitTrigger

func (self *DbStencilStore) CreateGitTrigger(gitTrigger *domain.GitTrigger) error

func (*DbStencilStore) CreateJob

func (self *DbStencilStore) CreateJob(job *domain.Job) error

func (*DbStencilStore) CreateJobNotifier

func (self *DbStencilStore) CreateJobNotifier(jobNotifier *domain.JobNotifier) error

func (*DbStencilStore) CreateNotificationRule

func (self *DbStencilStore) CreateNotificationRule(notificationRule *domain.NotificationRule) error

func (*DbStencilStore) CreateSchedule

func (self *DbStencilStore) CreateSchedule(schedule *domain.Schedule) error

func (*DbStencilStore) CreateSecret

func (self *DbStencilStore) CreateSecret(secret *domain.Secret) error

func (*DbStencilStore) CreateTask

func (self *DbStencilStore) CreateTask(task *domain.Task) error

func (*DbStencilStore) CreateWebhook

func (self *DbStencilStore) CreateWebhook(webhook *domain.Webhook) error

func (*DbStencilStore) FindEnvironmentByName

func (self *DbStencilStore) FindEnvironmentByName(environmentName string) (*domain.Environment, error)

func (*DbStencilStore) FindJobByName

func (self *DbStencilStore) FindJobByName(jobName string) (*domain.Job, error)

func (*DbStencilStore) FindProject

func (self *DbStencilStore) FindProject(uuid string) (*domain.Project, error)

func (*DbStencilStore) FindTaskByName

func (self *DbStencilStore) FindTaskByName(taskName string) (*domain.Task, error)

func (*DbStencilStore) FindUser

func (self *DbStencilStore) FindUser(uuid string) (*domain.User, error)

func (*DbStencilStore) Log

func (self *DbStencilStore) Log() logger.Logger

func (*DbStencilStore) SetLogger

func (self *DbStencilStore) SetLogger(l logger.Logger)

func (*DbStencilStore) ToConfiguration

func (self *DbStencilStore) ToConfiguration() *stencil.Configuration

type DbSubscriptionStore

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

func NewDbSubscriptionStore

func NewDbSubscriptionStore(tx *sqlx.Tx) *DbSubscriptionStore

func (*DbSubscriptionStore) Create

func (store *DbSubscriptionStore) Create(subscription *domain.Subscription) (string, error)

func (*DbSubscriptionStore) Delete

func (store *DbSubscriptionStore) Delete(subscriptionUuid string) error

func (*DbSubscriptionStore) Find

func (store *DbSubscriptionStore) Find(watchableId, event, userUuid string) (*domain.Subscription, error)

func (*DbSubscriptionStore) FindEventsForUser

func (store *DbSubscriptionStore) FindEventsForUser(watchableId, userUuid string) ([]string, error)

func (*DbSubscriptionStore) Log

func (store *DbSubscriptionStore) Log() logger.Logger

func (*DbSubscriptionStore) SetLogger

func (store *DbSubscriptionStore) SetLogger(l logger.Logger)

type DbTargetStore

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

func NewDbTargetStore

func NewDbTargetStore(tx *sqlx.Tx) *DbTargetStore

func (DbTargetStore) Create

func (store DbTargetStore) Create(target *domain.Target) (string, error)

func (DbTargetStore) FindAllByEnvironmentUuid

func (store DbTargetStore) FindAllByEnvironmentUuid(envUuid string) ([]*domain.Target, error)

func (DbTargetStore) FindAllByProjectUuid

func (store DbTargetStore) FindAllByProjectUuid(projUuid string) ([]*domain.Target, error)

func (DbTargetStore) FindByUuid

func (store DbTargetStore) FindByUuid(uuid string) (*domain.Target, error)

func (DbTargetStore) Log

func (self DbTargetStore) Log() logger.Logger

func (DbTargetStore) SetLogger

func (self DbTargetStore) SetLogger(l logger.Logger)

type DbTaskStore

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

func NewDbTaskStore

func NewDbTaskStore(tx *sqlx.Tx) *DbTaskStore

func (DbTaskStore) ArchiveByUuid

func (store DbTaskStore) ArchiveByUuid(uuid string) error

func (DbTaskStore) Create

func (store DbTaskStore) Create(task *domain.Task) (string, error)

func (DbTaskStore) FindAll

func (store DbTaskStore) FindAll() ([]*domain.Task, error)

func (DbTaskStore) FindAllByProjectUuid

func (store DbTaskStore) FindAllByProjectUuid(projUuid string) ([]*domain.Task, error)

func (*DbTaskStore) FindByJobUuid

func (store *DbTaskStore) FindByJobUuid(jobUuid string) (*domain.Task, error)

func (DbTaskStore) FindByName

func (store DbTaskStore) FindByName(name string) (*domain.Task, error)

func (DbTaskStore) FindByUuid

func (store DbTaskStore) FindByUuid(uuid string) (*domain.Task, error)

func (DbTaskStore) Log

func (store DbTaskStore) Log() logger.Logger

func (DbTaskStore) SetLogger

func (store DbTaskStore) SetLogger(l logger.Logger)

func (DbTaskStore) Update

func (store DbTaskStore) Update(task *domain.Task) error

type DbUserBlockStore

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

func NewDbUserBlockStore

func NewDbUserBlockStore(tx *sqlx.Tx) *DbUserBlockStore

func (*DbUserBlockStore) Create

func (store *DbUserBlockStore) Create(block *domain.UserBlock) error

func (*DbUserBlockStore) DeleteByUserUuidAndReason

func (store *DbUserBlockStore) DeleteByUserUuidAndReason(userUuid, reason string) error

func (*DbUserBlockStore) FindAllByUserUuid

func (store *DbUserBlockStore) FindAllByUserUuid(userUuid string) ([]*domain.UserBlock, error)

func (*DbUserBlockStore) FindAllByUserUuidValidFrom

func (store *DbUserBlockStore) FindAllByUserUuidValidFrom(userUuid string, validFrom time.Time) ([]*domain.UserBlock, error)

func (*DbUserBlockStore) Log

func (self *DbUserBlockStore) Log() logger.Logger

func (*DbUserBlockStore) SetLogger

func (self *DbUserBlockStore) SetLogger(l logger.Logger)

type DbUserStore

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

getDbUserStore stores users in the database

func NewDbUserStore

func NewDbUserStore(tx *sqlx.Tx, c *config.Config) *DbUserStore

func (DbUserStore) Create

func (store DbUserStore) Create(u *domain.User) (string, error)

func (DbUserStore) FindAllForProject

func (store DbUserStore) FindAllForProject(projectUuid string) ([]*domain.User, error)

func (*DbUserStore) FindAllSubscribers

func (store *DbUserStore) FindAllSubscribers(watchableId, event string) ([]*domain.User, error)

func (DbUserStore) FindByEmailAddress

func (store DbUserStore) FindByEmailAddress(email string) (*domain.User, error)

Used for password reset. The user is neved as a response. We need it to trigger an email to the user that the password reset was requested for.

func (DbUserStore) FindByUuid

func (store DbUserStore) FindByUuid(uuid string) (*domain.User, error)

func (DbUserStore) FindUuidByEmailAddressAndPassword

func (store DbUserStore) FindUuidByEmailAddressAndPassword(email string, password string) (string, error)

func (DbUserStore) Log

func (self DbUserStore) Log() logger.Logger

func (DbUserStore) SetLogger

func (self DbUserStore) SetLogger(l logger.Logger)

func (DbUserStore) Update

func (store DbUserStore) Update(u *domain.User) error

type DbWebhookStore

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

func NewDbWebhookStore

func NewDbWebhookStore(tx *sqlx.Tx) *DbWebhookStore

func (*DbWebhookStore) ArchiveByUuid

func (store *DbWebhookStore) ArchiveByUuid(uuid string) error

func (*DbWebhookStore) Create

func (store *DbWebhookStore) Create(webhook *domain.Webhook) (string, error)

func (*DbWebhookStore) FindAllByJobUuid

func (store *DbWebhookStore) FindAllByJobUuid(uuid string) ([]*domain.Webhook, error)

func (*DbWebhookStore) FindByProjectUuid

func (store *DbWebhookStore) FindByProjectUuid(uuid string) ([]*domain.Webhook, error)

func (*DbWebhookStore) FindBySlug

func (store *DbWebhookStore) FindBySlug(slug string) (*domain.Webhook, error)

func (*DbWebhookStore) FindByUuid

func (store *DbWebhookStore) FindByUuid(uuid string) (*domain.Webhook, error)

func (*DbWebhookStore) Log

func (store *DbWebhookStore) Log() logger.Logger

func (*DbWebhookStore) SetLogger

func (store *DbWebhookStore) SetLogger(l logger.Logger)

func (*DbWebhookStore) Update

func (store *DbWebhookStore) Update(webhook *domain.Webhook) error

type DbWorkspaceBaseImageStore

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

func NewDbWorkspaceBaseImageStore

func NewDbWorkspaceBaseImageStore(tx *sqlx.Tx) *DbWorkspaceBaseImageStore

func (*DbWorkspaceBaseImageStore) Create

func (*DbWorkspaceBaseImageStore) FindByUuid

func (store *DbWorkspaceBaseImageStore) FindByUuid(wsbiUuid string) (*domain.WorkspaceBaseImage, error)

func (*DbWorkspaceBaseImageStore) Log

func (*DbWorkspaceBaseImageStore) SetLogger

func (store *DbWorkspaceBaseImageStore) SetLogger(l logger.Logger)

type DiskLogStore

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

func (*DiskLogStore) Close

func (self *DiskLogStore) Close() error

func (*DiskLogStore) FindByOperationUuid

func (self *DiskLogStore) FindByOperationUuid(uuid string, tepy string) (*domain.Loggable, error)

This is not thread-safe! During operation run time, the redis log store will be used instead

func (*DiskLogStore) FindByRange

func (self *DiskLogStore) FindByRange(uuid string, tepy string, from, to int) (*domain.Loggable, error)

func (*DiskLogStore) Log

func (self *DiskLogStore) Log() logger.Logger

func (*DiskLogStore) OnFinished

func (self *DiskLogStore) OnFinished(operationUuid string) error

func (*DiskLogStore) PersistLogLine

func (self *DiskLogStore) PersistLogLine(operationUuid string, logLine *domain.LogLine) error

func (*DiskLogStore) SetLogger

func (self *DiskLogStore) SetLogger(l logger.Logger)

type KVActivityStreamStore

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

func NewKVActivityStreamStore

func NewKVActivityStreamStore(kv KeyValueStore) *KVActivityStreamStore

func (*KVActivityStreamStore) AddActivityToUserStream

func (self *KVActivityStreamStore) AddActivityToUserStream(activity *domain.ActivityOnStream, userUuid string) error

func (*KVActivityStreamStore) FindStreamForUser

func (self *KVActivityStreamStore) FindStreamForUser(uuid string) ([]*domain.ActivityOnStream, error)

func (*KVActivityStreamStore) IsUnread

func (self *KVActivityStreamStore) IsUnread(activityId int, viewerUuid string) (bool, error)

func (*KVActivityStreamStore) Log

func (self *KVActivityStreamStore) Log() logger.Logger

func (*KVActivityStreamStore) MarkAsRead

func (self *KVActivityStreamStore) MarkAsRead(activityId int, viewerUuid string) error

func (*KVActivityStreamStore) MarkAsUnread

func (self *KVActivityStreamStore) MarkAsUnread(activityId int, viewerUuid string) error

func (*KVActivityStreamStore) SetLogger

func (self *KVActivityStreamStore) SetLogger(l logger.Logger)

func (*KVActivityStreamStore) StoreActivity

func (self *KVActivityStreamStore) StoreActivity(activity *domain.ActivityOnStream) error

type KeyValueStore

type KeyValueStore interface {
	Get(key string) ([]byte, error)
	Exists(key string) (bool, error)
	Set(key string, data []byte) error
	Del(key string) error

	LRange(key string, start, stop int64) ([]string, error)
	LPush(key string, data string) error
	RPush(key string, data string) error

	SMembers(key string) ([]string, error)
	SIsMember(key, member string) (bool, error)
	SAdd(key, member string) (int64, error)
	SRem(key, member string) (int64, error)
}

func NewRedisKeyValueStore

func NewRedisKeyValueStore(c *redis.Client) KeyValueStore

type LogStore

type LogStore interface {
	FindByOperationUuid(uuid string, tepy string) (*domain.Loggable, error)
	FindByRange(uuid string, tepy string, from, to int) (*domain.Loggable, error)
	PersistLogLine(operationUuid string, logLine *domain.LogLine) error
	OnFinished(operationUuid string) error
}

func NewDiskLogStore

func NewDiskLogStore(logDir string) LogStore

type RedisKeyValueStore

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

func (*RedisKeyValueStore) Del

func (self *RedisKeyValueStore) Del(key string) error

func (*RedisKeyValueStore) Exists

func (self *RedisKeyValueStore) Exists(key string) (bool, error)

func (*RedisKeyValueStore) Get

func (self *RedisKeyValueStore) Get(key string) ([]byte, error)

func (*RedisKeyValueStore) LPush

func (self *RedisKeyValueStore) LPush(key string, data string) error

func (*RedisKeyValueStore) LRange

func (self *RedisKeyValueStore) LRange(key string, start, stop int64) ([]string, error)

func (*RedisKeyValueStore) RPush

func (self *RedisKeyValueStore) RPush(key string, data string) error

func (*RedisKeyValueStore) SAdd

func (self *RedisKeyValueStore) SAdd(key, member string) (int64, error)

func (*RedisKeyValueStore) SIsMember

func (self *RedisKeyValueStore) SIsMember(key, member string) (bool, error)

func (*RedisKeyValueStore) SMembers

func (self *RedisKeyValueStore) SMembers(key string) ([]string, error)

func (*RedisKeyValueStore) SRem

func (self *RedisKeyValueStore) SRem(key, member string) (int64, error)

func (*RedisKeyValueStore) Set

func (self *RedisKeyValueStore) Set(key string, data []byte) error

type RedisLogStore

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

func NewRedisLogStore

func NewRedisLogStore(kv KeyValueStore) *RedisLogStore

func (*RedisLogStore) FindByOperationUuid

func (self *RedisLogStore) FindByOperationUuid(uuid string, tepy string) (*domain.Loggable, error)

func (*RedisLogStore) FindByRange

func (self *RedisLogStore) FindByRange(uuid string, tepy string, from, to int) (*domain.Loggable, error)

func (*RedisLogStore) Log

func (self *RedisLogStore) Log() logger.Logger

func (*RedisLogStore) OnFinished

func (self *RedisLogStore) OnFinished(operationUuid string) error

func (*RedisLogStore) PersistLogLine

func (self *RedisLogStore) PersistLogLine(operationUuid string, logLine *domain.LogLine) error

func (*RedisLogStore) SetLogger

func (self *RedisLogStore) SetLogger(l logger.Logger)

type RedisSecretKeyValueStore

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

func (*RedisSecretKeyValueStore) Del

func (self *RedisSecretKeyValueStore) Del(key string) error

func (*RedisSecretKeyValueStore) Get

func (self *RedisSecretKeyValueStore) Get(key string, passphrase []byte) ([]byte, error)

func (*RedisSecretKeyValueStore) Log

func (*RedisSecretKeyValueStore) Set

func (self *RedisSecretKeyValueStore) Set(key string, passphrase, data []byte) error

func (*RedisSecretKeyValueStore) SetLogger

func (self *RedisSecretKeyValueStore) SetLogger(l logger.Logger)

type RepositoryCredentialStore

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

func NewRepositoryCredentialStore

func NewRepositoryCredentialStore(ss SecretKeyValueStore, tx *sqlx.Tx) *RepositoryCredentialStore

func (*RepositoryCredentialStore) Create

func (self *RepositoryCredentialStore) Create(repositoryCredential *domain.RepositoryCredential) (string, error)

func (*RepositoryCredentialStore) FindByRepositoryUuid

func (self *RepositoryCredentialStore) FindByRepositoryUuid(repositoryUuid string) (*domain.RepositoryCredential, error)

func (*RepositoryCredentialStore) FindByRepositoryUuidAndType

func (self *RepositoryCredentialStore) FindByRepositoryUuidAndType(uuid string, credentialType domain.RepositoryCredentialType) (*domain.RepositoryCredential, error)

func (*RepositoryCredentialStore) FindByRepositoryUuidAndTypeNoLoad

func (self *RepositoryCredentialStore) FindByRepositoryUuidAndTypeNoLoad(uuid string, credentialType domain.RepositoryCredentialType) (*domain.RepositoryCredential, error)

func (*RepositoryCredentialStore) FindByUuid

func (*RepositoryCredentialStore) Log

func (*RepositoryCredentialStore) SetLogger

func (self *RepositoryCredentialStore) SetLogger(l logger.Logger)

func (*RepositoryCredentialStore) Update

type SecretKeyValueStore

type SecretKeyValueStore interface {
	Get(key string, passphrase []byte) ([]byte, error)
	Set(key string, passphrase, data []byte) error
	Del(key string) error
}

func NewRedisSecretKeyValueStore

func NewRedisSecretKeyValueStore(c *redis.Client) SecretKeyValueStore

type SecretStore

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

func NewSecretStore

func NewSecretStore(ss SecretKeyValueStore, tx *sqlx.Tx) *SecretStore

func (*SecretStore) ArchiveByUuid

func (self *SecretStore) ArchiveByUuid(uuid string) error

func (*SecretStore) Create

func (self *SecretStore) Create(secret *domain.Secret) (string, error)

func (*SecretStore) FindAll

func (self *SecretStore) FindAll() ([]*domain.Secret, error)

func (*SecretStore) FindAllByEnvironmentUuid

func (self *SecretStore) FindAllByEnvironmentUuid(environmentUuid string) ([]*domain.Secret, error)

func (*SecretStore) FindByUuid

func (self *SecretStore) FindByUuid(uuid string) (*domain.Secret, error)

func (*SecretStore) Log

func (self *SecretStore) Log() logger.Logger

func (*SecretStore) SetLogger

func (self *SecretStore) SetLogger(l logger.Logger)

func (*SecretStore) Update

func (self *SecretStore) Update(secret *domain.Secret) error

type UnknownEventTypeError

type UnknownEventTypeError struct {
	EventName string
	RawData   string
}

func (*UnknownEventTypeError) Error

func (store *UnknownEventTypeError) Error() string

Jump to

Keyboard shortcuts

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