tutorial

package
v0.0.0-...-122f59b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 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 {
	Store Store
}

func (*Service) DetectProgresses

func (s *Service) DetectProgresses(resourceInTargetFs *resource.ResourceFile, data []byte) (out []Progress, err error)

func (*Service) Get

func (s *Service) Get(appID string) (*Entry, error)

func (*Service) OnUpdateResource

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

func (*Service) RecordProgresses

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

func (*Service) Skip

func (s *Service) Skip(appID string) (err error)

type Store

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

type StoreImpl

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

func (*StoreImpl) Get

func (s *StoreImpl) Get(appID string) (*Entry, error)

func (*StoreImpl) Save

func (s *StoreImpl) Save(entry *Entry) error

Jump to

Keyboard shortcuts

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