migration

package
v0.0.0-...-0494513 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultApps = map[string]struct{}{
	"ai circle profile photo":      {},
	"ai circle cover photo":        {},
	"ai image generator":           {},
	"floral image generator":       {},
	"cartoon image generator":      {},
	"anime image generator":        {},
	"watercolor image generator":   {},
	"makeup image generator":       {},
	"oil painting image generator": {},
	"3d image generator":           {},
	"sketch image generator":       {},
}
View Source
var EnabledAppsConfig = map[string]int64{
	"ai circle profile photo":      15342,
	"ai circle cover photo":        18248,
	"ai image generator":           19456,
	"floral image generator":       12321,
	"cartoon image generator":      12567,
	"anime image generator":        14645,
	"watercolor image generator":   13489,
	"makeup image generator":       12897,
	"oil painting image generator": 12723,
	"3d image generator":           14684,
	"sketch image generator":       14222,
}

Functions

func WithMigrationName

func WithMigrationName(ctx context.Context, name string) context.Context

Types

type Handler

type Handler func(ctx context.Context) error

type Manager

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

func New

func New(
	instanceID string,
	db *spanner.Client,
	svc Service,
	roleClient role.RoleAPIClient,
	circleClient circle.CircleAPIClient,
) *Manager

func (*Manager) CleanupConfigurations

func (m *Manager) CleanupConfigurations(ctx context.Context, run uint)

func (*Manager) CleanupPods

func (m *Manager) CleanupPods(ctx context.Context, run uint)

func (*Manager) MigrateAppConfigurations

func (m *Manager) MigrateAppConfigurations(ctx context.Context, run uint)

func (*Manager) MigrateCircleMembers

func (m *Manager) MigrateCircleMembers(ctx context.Context, run uint)

func (*Manager) MigrateCircles

func (m *Manager) MigrateCircles(ctx context.Context, run uint)

func (*Manager) MigrateDefaultApps

func (m *Manager) MigrateDefaultApps(ctx context.Context, run uint)

func (*Manager) MigrateEnabledApps

func (m *Manager) MigrateEnabledApps(ctx context.Context, run uint)

func (*Manager) MigrateRoles

func (m *Manager) MigrateRoles(ctx context.Context, run uint)

func (*Manager) Shutdown

func (m *Manager) Shutdown()

type Service

type Service interface {
	EnableAppInCircle(ctx context.Context, circleID, appID string) (err error)
	DeleteApp(ctx context.Context, appID string) error
}

type TempCircles

type TempCircles struct{}

func GetTempCircles

func GetTempCircles() TempCircles

func (TempCircles) AllColumns

func (t TempCircles) AllColumns() []string

func (TempCircles) DeletedAt

func (TempCircles) DeletedAt() string

func (TempCircles) ID

func (TempCircles) ID() string

func (TempCircles) TableName

func (TempCircles) TableName() string

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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