tutorial

package
v0.0.0-...-4c7c1d8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ProgressAuthui            = "authui"
	ProgressCustomizeUI       = "customize_ui"
	ProgressCreateApplication = "create_application"
	ProgressSSO               = "sso"
	ProgressInvite            = "invite"
)

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(Service), "*"),
	wire.Struct(new(StoreImpl), "*"),
	wire.Bind(new(Store), new(*StoreImpl)),
)

Functions

This section is empty.

Types

type Entry

type Entry struct {
	AppID string
	Data  map[string]interface{}
}

func NewEntry

func NewEntry(appID string) *Entry

func (*Entry) AddProgress

func (e *Entry) AddProgress(ps []Progress)

func (*Entry) Skip

func (e *Entry) Skip()

type Progress

type Progress string

func ProgressFromString

func ProgressFromString(s string) (Progress, bool)

type Service

type Service struct {
	GlobalDatabase *globaldb.Handle
	Store          Store
}

func (*Service) Get

func (s *Service) Get(ctx context.Context, appID string) (*Entry, error)

Get acquires connection.

func (*Service) OnUpdateResource0

func (s *Service) OnUpdateResource0(ctx context.Context, appID string, resourcesInAllFss []resource.ResourceFile, resourceInTargetFs *resource.ResourceFile, data []byte) (err error)

OnUpdateResource0 assumes acquired connection.

func (*Service) RecordProgresses

func (s *Service) RecordProgresses(ctx context.Context, appID string, ps []Progress) (err error)

RecordProgresses acquires connection.

func (*Service) Skip

func (s *Service) Skip(ctx context.Context, appID string) (err error)

Skip acquires connection.

type Store

type Store interface {
	Get(ctx context.Context, appID string) (*Entry, error)
	Save(ctx context.Context, entry *Entry) error
}

type StoreImpl

type StoreImpl struct {
	SQLBuilder  *globaldb.SQLBuilder
	SQLExecutor *globaldb.SQLExecutor
}

func (*StoreImpl) Get

func (s *StoreImpl) Get(ctx context.Context, appID string) (*Entry, error)

func (*StoreImpl) Save

func (s *StoreImpl) Save(ctx context.Context, entry *Entry) error

Jump to

Keyboard shortcuts

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