plan

package
v0.0.0-...-cab84a2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	NewStoreFactory,
	wire.Struct(new(Store), "*"),
)
View Source
var ErrPlanNotFound = errors.New("plan not found")

Functions

This section is empty.

Types

type Plan

type Plan struct {
	ID               string
	Name             string
	RawFeatureConfig *config.FeatureConfig
}

func NewPlan

func NewPlan(name string) *Plan

type Store

type Store struct {
	Clock       clock.Clock
	SQLBuilder  *globaldb.SQLBuilder
	SQLExecutor *globaldb.SQLExecutor
}

func (*Store) Create

func (s *Store) Create(ctx context.Context, plan *Plan) error

func (*Store) GetPlan

func (s *Store) GetPlan(ctx context.Context, name string) (*Plan, error)

func (*Store) List

func (s *Store) List(ctx context.Context) ([]*Plan, error)

func (*Store) Update

func (s *Store) Update(ctx context.Context, plan *Plan) error

type StoreFactory

type StoreFactory func(handle *globaldb.Handle) *Store

func NewStoreFactory

func NewStoreFactory(
	sqlbuilder *globaldb.SQLBuilder,
) StoreFactory

Jump to

Keyboard shortcuts

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