bizgebura

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gebura added in v0.0.2

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

func NewGebura added in v0.0.2

func NewGebura(
	repo GeburaRepo,
	auth *libauth.Auth,
	mClient mapper.LibrarianMapperServiceClient,
	sClient *client.Searcher,
	updateAppIndex *libmq.Topic[modelangela.UpdateAppIndex],
) *Gebura

func (*Gebura) AddAppPackageRunTime added in v0.1.14

func (g *Gebura) AddAppPackageRunTime(
	ctx context.Context,
	packageID model.InternalID,
	timeRange *model.TimeRange,
) *errors.Error

func (*Gebura) AssignAppPackage added in v0.0.4

func (g *Gebura) AssignAppPackage(
	ctx context.Context,
	appID model.InternalID,
	appPackageID model.InternalID,
) *errors.Error

func (*Gebura) CreateApp added in v0.0.2

func (g *Gebura) CreateApp(ctx context.Context, app *modelgebura.App) (*modelgebura.App, *errors.Error)

func (*Gebura) CreateAppPackage added in v0.0.4

func (g *Gebura) CreateAppPackage(
	ctx context.Context,
	a *modelgebura.AppPackage,
) (*modelgebura.AppPackage, *errors.Error)

func (*Gebura) GetApp added in v0.1.6

func (g *Gebura) GetApp(ctx context.Context, id model.InternalID) (*modelgebura.App, *errors.Error)

func (*Gebura) GetBindApps added in v0.0.9

func (g *Gebura) GetBindApps(ctx context.Context, id model.InternalID) ([]*modelgebura.App, *errors.Error)

func (*Gebura) GetPurchasedApps added in v0.0.10

func (g *Gebura) GetPurchasedApps(ctx context.Context) ([]*modelgebura.App, *errors.Error)

func (*Gebura) ListAppPackages added in v0.0.10

func (g *Gebura) ListAppPackages(
	ctx context.Context,
	paging model.Paging,
	sources []modelgebura.AppPackageSource,
	ids []model.InternalID,
) ([]*modelgebura.AppPackage, int, *errors.Error)

func (*Gebura) ListApps added in v0.0.10

func (g *Gebura) ListApps(
	ctx context.Context,
	paging model.Paging,
	sources []modelgebura.AppSource,
	types []modelgebura.AppType,
	ids []model.InternalID,
	containDetails bool,
) ([]*modelgebura.App, int64, *errors.Error)

func (*Gebura) MergeApps added in v0.0.10

func (g *Gebura) MergeApps(ctx context.Context, base modelgebura.App, merged model.InternalID) *errors.Error

func (*Gebura) NewReportAppPackageHandler added in v0.0.4

func (g *Gebura) NewReportAppPackageHandler(ctx context.Context) (ReportAppPackageHandler, *errors.Error)

func (*Gebura) PurchaseApp added in v0.0.10

func (g *Gebura) PurchaseApp(ctx context.Context, id model.InternalID) *errors.Error

func (*Gebura) SearchApps added in v0.0.10

func (g *Gebura) SearchApps(ctx context.Context, paging model.Paging, keyword string) (
	[]*modelgebura.App, int, *errors.Error)

func (*Gebura) SumAppPackageRunTime added in v0.1.14

func (g *Gebura) SumAppPackageRunTime(
	ctx context.Context,
	packageID model.InternalID,
	timeRange *model.TimeRange,
) (time.Duration, error)

func (*Gebura) UnAssignAppPackage added in v0.0.10

func (g *Gebura) UnAssignAppPackage(ctx context.Context, appPackageID model.InternalID) *errors.Error

func (*Gebura) UpdateApp added in v0.0.2

func (g *Gebura) UpdateApp(ctx context.Context, app *modelgebura.App) *errors.Error

func (*Gebura) UpdateAppPackage added in v0.0.4

func (g *Gebura) UpdateAppPackage(ctx context.Context, a *modelgebura.AppPackage) *errors.Error

type GeburaRepo

type GeburaRepo interface {
	CreateApp(context.Context, *modelgebura.App) error
	UpdateApp(context.Context, *modelgebura.App) error
	ListApps(context.Context, model.Paging, []modelgebura.AppSource, []modelgebura.AppType,
		[]model.InternalID, bool) ([]*modelgebura.App, int64, error)
	MergeApps(context.Context, modelgebura.App, model.InternalID) error
	GetBoundApps(context.Context, model.InternalID) ([]*modelgebura.App, error)
	GetBatchBoundApps(context.Context, []model.InternalID) ([]*modelgebura.BoundApps, error)
	PurchaseApp(context.Context, model.InternalID, model.InternalID) error
	GetPurchasedApps(context.Context, model.InternalID) ([]*modelgebura.BoundApps, error)

	CreateAppPackage(context.Context, model.InternalID, *modelgebura.AppPackage) error
	UpdateAppPackage(context.Context, model.InternalID, *modelgebura.AppPackage) error
	UpsertAppPackages(context.Context, model.InternalID, []*modelgebura.AppPackage) error
	ListAppPackages(context.Context, model.Paging, []modelgebura.AppPackageSource,
		[]model.InternalID) ([]*modelgebura.AppPackage, int, error)
	AssignAppPackage(context.Context, model.InternalID, model.InternalID, model.InternalID) error
	ListAppPackageBinaryChecksumOfOneSource(context.Context, modelgebura.AppPackageSource,
		model.InternalID) ([]string, error)
	UnAssignAppPackage(context.Context, model.InternalID, model.InternalID) error
	AddAppPackageRunTime(context.Context, model.InternalID, model.InternalID, *model.TimeRange) error
	SumAppPackageRunTime(context.Context, model.InternalID, model.InternalID, *model.TimeRange) (time.Duration, error)
}

type ReportAppPackageHandler added in v0.0.4

type ReportAppPackageHandler interface {
	Handle(context.Context, []*modelgebura.AppPackageBinary) *errors.Error
}

Jump to

Keyboard shortcuts

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