bizgebura

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 18 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 (*Gebura) AddAppInstRunTime added in v0.2.3

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

func (*Gebura) AssignApp added in v0.2.3

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

func (*Gebura) CreateApp added in v0.0.2

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

func (*Gebura) CreateAppInfo added in v0.2.3

func (g *Gebura) CreateAppInfo(
	ctx context.Context,
	appInfo *modelgebura.AppInfo,
) (*modelgebura.AppInfo, *errors.Error)

func (*Gebura) CreateAppInst added in v0.2.3

func (g *Gebura) CreateAppInst(
	ctx context.Context,
	inst *modelgebura.AppInst,
) (*modelgebura.AppInst, *errors.Error)

func (*Gebura) GetAppInfo added in v0.2.3

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

func (*Gebura) GetBoundAppInfos added in v0.2.3

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

func (*Gebura) GetPurchasedAppInfos added in v0.2.3

func (g *Gebura) GetPurchasedAppInfos(ctx context.Context, source string) ([]*modelgebura.AppInfoMixed, *errors.Error)

func (*Gebura) ListAppInfos added in v0.2.3

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

func (*Gebura) ListAppInsts added in v0.2.3

func (g *Gebura) ListAppInsts(
	ctx context.Context,
	paging model.Paging,
	ids []model.InternalID,
	appIDs []model.InternalID,
	deviceIDs []model.InternalID,
) ([]*modelgebura.AppInst, int, *errors.Error)

func (*Gebura) ListApps added in v0.0.10

func (g *Gebura) ListApps(
	ctx context.Context,
	paging model.Paging,
	ownerIDs []model.InternalID,
	appInfoIDs []model.InternalID,
	ids []model.InternalID,
) ([]*modelgebura.App, int, *errors.Error)

func (*Gebura) MergeAppInfos added in v0.2.3

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

func (*Gebura) PurchaseAppInfo added in v0.2.3

func (g *Gebura) PurchaseAppInfo(ctx context.Context, infoID *modelgebura.AppInfoID) (model.InternalID, *errors.Error)

func (*Gebura) SearchAppInfos added in v0.2.3

func (g *Gebura) SearchAppInfos(ctx context.Context, paging model.Paging, query string) (
	[]*modelgebura.AppInfoMixed, int, *errors.Error)

func (*Gebura) SearchNewAppInfos added in v0.2.7

func (g *Gebura) SearchNewAppInfos(
	ctx context.Context,
	paging model.Paging,
	name string,
	sourceFilter []string,
) ([]*modelgebura.AppInfo, int, *errors.Error)

func (*Gebura) SumAppInstRunTime added in v0.2.3

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

func (*Gebura) SyncAppInfos added in v0.2.3

func (g *Gebura) SyncAppInfos(
	ctx context.Context,
	infoIDs []*modelgebura.AppInfoID,
	wait bool,
) ([]*modelgebura.AppInfo, *errors.Error)

func (*Gebura) UnAssignApp added in v0.2.3

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

func (*Gebura) UpdateApp added in v0.0.2

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

func (*Gebura) UpdateAppInfo added in v0.2.3

func (g *Gebura) UpdateAppInfo(ctx context.Context, appInfo *modelgebura.AppInfo) *errors.Error

func (*Gebura) UpdateAppInst added in v0.2.3

func (g *Gebura) UpdateAppInst(ctx context.Context, inst *modelgebura.AppInst) *errors.Error

type GeburaRepo

type GeburaRepo interface {
	CreateAppInfo(context.Context, *modelgebura.AppInfo) error
	CreateAppInfoOrGet(context.Context, *modelgebura.AppInfo) (*modelgebura.AppInfo, error)
	UpdateAppInfo(context.Context, *modelgebura.AppInfo) error
	ListAppInfos(context.Context, model.Paging, []string, []modelgebura.AppType,
		[]model.InternalID, bool) ([]*modelgebura.AppInfo, int64, error)
	MergeAppInfos(context.Context, modelgebura.AppInfo, model.InternalID) error
	GetAppInfo(context.Context, modelgebura.AppInfoID) (*modelgebura.AppInfo, error)
	GetBoundAppInfos(context.Context, model.InternalID) ([]*modelgebura.AppInfo, error)
	GetBatchBoundAppInfos(context.Context, []model.InternalID) ([]*modelgebura.BoundAppInfos, error)
	PurchaseAppInfo(context.Context, model.InternalID,
		*modelgebura.AppInfoID, func(ctx2 context.Context) error) (model.InternalID, error)
	GetPurchasedAppInfos(context.Context, model.InternalID, string) ([]*modelgebura.BoundAppInfos, error)

	CreateApp(context.Context, model.InternalID, *modelgebura.App) error
	UpdateApp(context.Context, model.InternalID, *modelgebura.App) error
	ListApps(context.Context, model.Paging, []model.InternalID, []model.InternalID,
		[]model.InternalID, bool) ([]*modelgebura.App, int, error)
	AssignApp(context.Context, model.InternalID, model.InternalID, model.InternalID) error
	// ListAppPackageBinaryChecksumOfOneSource(context.Context, modelgebura.AppPackageSource,
	//	model.InternalID) ([]string, error)
	UnAssignApp(context.Context, model.InternalID, model.InternalID) error
	AddAppInstRunTime(context.Context, model.InternalID, model.InternalID, *model.TimeRange) error
	SumAppInstRunTime(context.Context, model.InternalID, model.InternalID, *model.TimeRange) (time.Duration, error)
	CreateAppInst(context.Context, model.InternalID, *modelgebura.AppInst) error
	UpdateAppInst(context.Context, model.InternalID, *modelgebura.AppInst) error
	ListAppInsts(context.Context, model.InternalID, model.Paging, []model.InternalID,
		[]model.InternalID, []model.InternalID) ([]*modelgebura.AppInst, int, error)
}

type ReportAppPackageHandler added in v0.0.4

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

Jump to

Keyboard shortcuts

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