bizgebura

package
v0.0.4-2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToPBApp added in v0.0.2

func ToPBApp(a *App, containDetails bool) *librarian.App

func ToPBAppDetails added in v0.0.2

func ToPBAppDetails(d *AppDetails) *librarian.AppDetails

func ToPBAppList added in v0.0.2

func ToPBAppList(al []*App, containDetails bool) []*librarian.App

func ToPBAppPackage added in v0.0.4

func ToPBAppPackage(a *AppPackage) *librarian.AppPackage

func ToPBAppPackageList added in v0.0.4

func ToPBAppPackageList(al []*AppPackage) []*librarian.AppPackage

func ToPBAppPackageSource added in v0.0.4

func ToPBAppPackageSource(a AppPackageSource) librarian.AppPackageSource

func ToPBAppSource added in v0.0.2

func ToPBAppSource(s AppSource) librarian.AppSource

func ToPBAppType added in v0.0.2

func ToPBAppType(t AppType) librarian.AppType

func UploadArtifactsCallback

func UploadArtifactsCallback(file *bizbinah.UploadFile) error

Types

type App

type App struct {
	InternalID      int64
	Source          AppSource
	SourceAppID     string
	SourceURL       string
	Name            string
	Type            AppType
	ShorDescription string
	ImageURL        string
	Details         *AppDetails
}

type AppDetails

type AppDetails struct {
	Description string
	ReleaseDate string
	Developer   string
	Publisher   string
}

func ToBizAppDetail added in v0.0.2

func ToBizAppDetail(d *librarian.AppDetails) *AppDetails

type AppPackage added in v0.0.4

type AppPackage struct {
	InternalID      int64
	Source          AppPackageSource
	SourceID        int64
	SourcePackageID string
	Name            string
	Description     string
	Binary          AppPackageBinary
}

type AppPackageBinary added in v0.0.4

type AppPackageBinary struct {
	Name string
	Size string
}

type AppPackageSource added in v0.0.4

type AppPackageSource int
const (
	AppPackageSourceUnspecified AppPackageSource = iota
	AppPackageSourceManual
	AppPackageSourceSentinel
)

func ToBizAppPackageSource added in v0.0.4

func ToBizAppPackageSource(a librarian.AppPackageSource) AppPackageSource

func ToBizAppPackageSourceList added in v0.0.4

func ToBizAppPackageSourceList(al []librarian.AppPackageSource) []AppPackageSource

type AppSource

type AppSource int
const (
	AppSourceUnspecified AppSource = iota
	AppSourceInternal
	AppSourceSteam
)

func ToBizAppSource added in v0.0.2

func ToBizAppSource(s librarian.AppSource) AppSource

func ToBizAppSourceList added in v0.0.2

func ToBizAppSourceList(sl []librarian.AppSource) []AppSource

type AppType

type AppType int
const (
	AppTypeUnspecified AppType = iota
	AppTypeGame
)

func ToBizAppType added in v0.0.2

func ToBizAppType(t librarian.AppType) AppType

func ToBizAppTypeList added in v0.0.2

func ToBizAppTypeList(tl []librarian.AppType) []AppType

type Gebura added in v0.0.2

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

func (*Gebura) AssignAppPackage added in v0.0.4

func (g *Gebura) AssignAppPackage(ctx context.Context, app App, appPackage AppPackage) *errors.Error

func (*Gebura) BindApp added in v0.0.2

func (g *Gebura) BindApp(ctx context.Context, internal App, bind App) (*App, *errors.Error)

func (*Gebura) CreateApp added in v0.0.2

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

func (*Gebura) CreateAppPackage added in v0.0.4

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

func (*Gebura) ListApp added in v0.0.2

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

func (*Gebura) ListAppPackage added in v0.0.4

func (g *Gebura) ListAppPackage(
	ctx context.Context,
	paging Paging,
	sources []AppPackageSource,
	ids []int64,
) ([]*AppPackage, *errors.Error)

func (*Gebura) ListBindApp added in v0.0.3

func (g *Gebura) ListBindApp(ctx context.Context, id int64) ([]*App, *errors.Error)

func (*Gebura) NewReportAppPackageHandler added in v0.0.4

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

func (*Gebura) UpdateApp added in v0.0.2

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

func (*Gebura) UpdateAppPackage added in v0.0.4

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

func (*Gebura) UpsertApp added in v0.0.2

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

type GeburaRepo

type GeburaRepo interface {
	IsApp(context.Context, int64) error
	CreateApp(context.Context, *App) error
	UpdateApp(context.Context, *App) error
	UpsertApp(context.Context, []*App) error
	ListApp(context.Context, Paging, []AppSource, []AppType, []int64, bool) ([]*App, error)
	IsAppPackage(context.Context, int64) error
	CreateAppPackage(context.Context, *AppPackage) error
	UpdateAppPackage(context.Context, *AppPackage) error
	UpsertAppPackage(context.Context, []*AppPackage) error
	ListAppPackage(context.Context, Paging, []AppPackageSource, []int64) ([]*AppPackage, error)
	ListAllAppPackageIDOfOneSource(context.Context, AppPackageSource, int64) ([]string, error)
}

type Paging

type Paging struct {
	PageSize int
	PageNum  int
}

type ReportAppPackageHandler added in v0.0.4

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

Jump to

Keyboard shortcuts

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