dbstore

package
v0.0.0-...-aa36cb2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiTokenStore

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

func NewApiTokenStore

func NewApiTokenStore(db *gorm.DB) *ApiTokenStore

func (*ApiTokenStore) Create

func (s *ApiTokenStore) Create(teamId string, creatorId string, name string, scope store.ApiTokenScope) (*store.ApiToken, error)

func (*ApiTokenStore) Delete

func (s *ApiTokenStore) Delete(id string) error

func (*ApiTokenStore) Get

func (s *ApiTokenStore) Get(id string) (*store.ApiToken, error)

func (*ApiTokenStore) GetByToken

func (s *ApiTokenStore) GetByToken(token string) (*store.ApiToken, error)

func (*ApiTokenStore) List

func (s *ApiTokenStore) List(teamId string) ([]store.ApiToken, error)

func (*ApiTokenStore) UpdateLastUsedAt

func (s *ApiTokenStore) UpdateLastUsedAt(id string, lastUsedAt time.Time) error

type AppStore

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

func NewAppStore

func NewAppStore(params NewAppStoreParams) *AppStore

func (*AppStore) Create

func (s *AppStore) Create(opts store.CreateAppOptions) (store.App, error)

func (*AppStore) CreateAppSettings

func (s *AppStore) CreateAppSettings(opts store.CreateAppSettingsOptions) (store.AppSettings, error)

func (*AppStore) Delete

func (s *AppStore) Delete(ctx context.Context, id string) error

func (*AppStore) Get

func (s *AppStore) Get(ctx context.Context, id string) (store.App, error)

func (*AppStore) GetAppSettings

func (s *AppStore) GetAppSettings(id string) (store.AppSettings, error)

func (*AppStore) GetForTeam

func (s *AppStore) GetForTeam(ctx context.Context, teamId string) ([]store.App, error)

type BuildStore

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

func NewBuildStore

func NewBuildStore(db *gorm.DB) *BuildStore

func (*BuildStore) Get

func (s *BuildStore) Get(ctx context.Context, id string) (store.Build, error)

func (*BuildStore) Init

func (*BuildStore) UpdateArtifacts

func (s *BuildStore) UpdateArtifacts(ctx context.Context, id string, artifacts []store.Artifact) error

func (*BuildStore) UpdateLogs

func (s *BuildStore) UpdateLogs(ctx context.Context, id string, logs store.BuildLogs) error

func (*BuildStore) UpdateStatus

func (s *BuildStore) UpdateStatus(ctx context.Context, id string, status store.BuildStatus, statusReason string) error

type CellStore

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

func NewCellStore

func NewCellStore(params NewCellStoreParams) *CellStore

func (*CellStore) AddServer

func (s *CellStore) AddServer(cellId string, server store.Server) error

func (*CellStore) Create

func (s *CellStore) Create(cell store.Cell) (store.Cell, error)

func (*CellStore) Get

func (s *CellStore) Get(id string) (store.Cell, error)

func (*CellStore) GetForTeam

func (s *CellStore) GetForTeam(ctx context.Context, teamId string) ([]store.Cell, error)

func (*CellStore) UpdateTalosCellData

func (s *CellStore) UpdateTalosCellData(talosCellData *store.TalosCellData) error

type DeploymentStore

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

func NewDeploymentStore

func NewDeploymentStore(params NewDeploymentStoreParams) (*DeploymentStore, error)

func (*DeploymentStore) Create

func (*DeploymentStore) CreateAppEnvVars

func (s *DeploymentStore) CreateAppEnvVars(opts store.CreateAppEnvVarOptions) (store.AppEnvVars, error)

func (*DeploymentStore) CreateEnv

func (s *DeploymentStore) CreateEnv(opts store.CreateEnvOptions) (store.Env, error)

func (*DeploymentStore) DeleteAppEnvVars

func (s *DeploymentStore) DeleteAppEnvVars(id string) error

func (*DeploymentStore) DeleteDeployment

func (s *DeploymentStore) DeleteDeployment(appId string, envId string, id uint) error

func (*DeploymentStore) DeleteEnv

func (s *DeploymentStore) DeleteEnv(id string) error

func (*DeploymentStore) Get

func (s *DeploymentStore) Get(appId string, envId string, id uint) (store.Deployment, error)

func (*DeploymentStore) GetAppEnvVars

func (s *DeploymentStore) GetAppEnvVars(id string) (store.AppEnvVars, error)

func (*DeploymentStore) GetAppEnvVarsForAppEnv

func (s *DeploymentStore) GetAppEnvVarsForAppEnv(appId string, envId string) ([]store.AppEnvVars, error)

func (*DeploymentStore) GetEnv

func (s *DeploymentStore) GetEnv(id string) (store.Env, error)

func (*DeploymentStore) GetEnvsForTeam

func (s *DeploymentStore) GetEnvsForTeam(teamId string) ([]store.Env, error)

func (*DeploymentStore) GetForApp

func (s *DeploymentStore) GetForApp(ctx context.Context, appId string) ([]store.Deployment, error)

func (*DeploymentStore) GetForAppEnv

func (s *DeploymentStore) GetForAppEnv(ctx context.Context, appId string, envId string) ([]store.Deployment, error)

func (*DeploymentStore) GetForCell

func (s *DeploymentStore) GetForCell(cellId string) ([]store.Deployment, error)

func (*DeploymentStore) GetForEnv

func (s *DeploymentStore) GetForEnv(envId string) ([]store.Deployment, error)

func (*DeploymentStore) GetForTeam

func (s *DeploymentStore) GetForTeam(ctx context.Context, teamId string) ([]store.Deployment, error)

func (*DeploymentStore) GetLatestForAppEnv

func (s *DeploymentStore) GetLatestForAppEnv(ctx context.Context, appId string, envId string) (*store.Deployment, error)

func (*DeploymentStore) UpdateDeploymentStatus

func (s *DeploymentStore) UpdateDeploymentStatus(appId string, envId string, id uint, status store.DeploymentStatus, statusReason string) error

type InviteStore

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

func NewInviteStore

func NewInviteStore(params NewInviteStoreParams) *InviteStore

func (*InviteStore) Add

func (s *InviteStore) Add(email string) error

func (*InviteStore) Get

func (s *InviteStore) Get(email string) (*store.InvitedUser, error)

type NewAppStoreParams

type NewAppStoreParams struct {
	DB *gorm.DB
}

type NewCellStoreParams

type NewCellStoreParams struct {
	DB *gorm.DB
}

type NewDeploymentStoreParams

type NewDeploymentStoreParams struct {
	DB          *gorm.DB
	GetTeamKeys func(id string) (string, string, error)
}

type NewInviteStoreParams

type NewInviteStoreParams struct {
	DB *gorm.DB
}

type NewServerOfferingStoreParams

type NewServerOfferingStoreParams struct {
}

type NewServerStoreParams

type NewServerStoreParams struct {
	DB *gorm.DB
}

type NewTeamStoreParams

type NewTeamStoreParams struct {
	DB             *gorm.DB
	StripeCustomer *customer.Client
}

type NewUserStoreParams

type NewUserStoreParams struct {
	DB           *gorm.DB
	PasswordHash hash.PasswordHash
}

type NewWaitlistStoreParams

type NewWaitlistStoreParams struct {
	LoopsWaitlistFormUrl string
	DB                   *gorm.DB
}

type ServerOfferingStore

type ServerOfferingStore struct {
}

func (ServerOfferingStore) GetServerOffering

func (s ServerOfferingStore) GetServerOffering(id string) (*store.ServerOffering, error)

func (ServerOfferingStore) GetServerOfferings

func (s ServerOfferingStore) GetServerOfferings() ([]store.ServerOffering, error)

type ServerStore

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

func NewServerStore

func NewServerStore(params NewServerStoreParams) *ServerStore

func (*ServerStore) Create

func (s *ServerStore) Create(server store.Server) (store.Server, error)

func (*ServerStore) Get

func (s *ServerStore) Get(id string) (store.Server, error)

func (*ServerStore) GetServersForTeam

func (s *ServerStore) GetServersForTeam(ctx context.Context, teamId string) ([]store.Server, error)

func (*ServerStore) UpdateProviderId

func (s *ServerStore) UpdateProviderId(serverId string, providerId string) error

func (*ServerStore) UpdateServerBillingStripeUsageBasedHourly

func (s *ServerStore) UpdateServerBillingStripeUsageBasedHourly(serverId string, usageBasedHourly *store.ServerBillingStripeUsageBasedHourly) error

func (*ServerStore) UpdateServerPublicIpv4

func (s *ServerStore) UpdateServerPublicIpv4(serverId string, publicIpv4 string) error

func (*ServerStore) UpdateServerStatus

func (s *ServerStore) UpdateServerStatus(serverId string, status store.ServerStatus) error

type TeamStore

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

func NewTeamStore

func NewTeamStore(params NewTeamStoreParams) *TeamStore

func (TeamStore) AddPaymentMethod

func (s TeamStore) AddPaymentMethod(ctx context.Context, teamId string, paymentMethodData store.PaymentMethod) error

func (TeamStore) AddUserToTeam

func (s TeamStore) AddUserToTeam(userId string, teamId string) error

func (TeamStore) CreateStripeCustomer

func (s TeamStore) CreateStripeCustomer(ctx context.Context, teamId string, billingEmail string) error

func (TeamStore) CreateTeam

func (s TeamStore) CreateTeam(name string, description string) (*store.Team, error)

func (TeamStore) CreateTeamInvite

func (s TeamStore) CreateTeamInvite(email string, teamId string) error

func (TeamStore) DeleteTeamInvite

func (s TeamStore) DeleteTeamInvite(email string, teamId string) error

func (TeamStore) GetInvitesForEmail

func (s TeamStore) GetInvitesForEmail(email string) ([]store.TeamMemberInvite, error)

func (TeamStore) GetPaymentMethods

func (s TeamStore) GetPaymentMethods(teamId string) ([]store.PaymentMethod, error)

func (TeamStore) GetTeam

func (s TeamStore) GetTeam(ctx context.Context, id string) (*store.Team, error)

func (TeamStore) GetTeamKeys

func (s TeamStore) GetTeamKeys(id string) (string, string, error)

func (TeamStore) RemovePaymentMethod

func (s TeamStore) RemovePaymentMethod(teamId string, paymentMethodId string) error

func (TeamStore) RemoveUserFromTeam

func (s TeamStore) RemoveUserFromTeam(userId string, teamId string) error

type UserStore

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

func NewUserStore

func NewUserStore(params NewUserStoreParams) *UserStore

func (*UserStore) CreateUser

func (s *UserStore) CreateUser(email string, password string) error

func (*UserStore) GetUser

func (s *UserStore) GetUser(email string) (*store.User, error)

func (*UserStore) GetUserById

func (s *UserStore) GetUserById(id string) (*store.User, error)

type WaitlistStore

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

func NewWaitlistStore

func NewWaitlistStore(params NewWaitlistStoreParams) *WaitlistStore

func (*WaitlistStore) Add

func (s *WaitlistStore) Add(ctx context.Context, email string) error

Jump to

Keyboard shortcuts

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