bizgebura

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 10 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 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 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) 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) 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) ListBindApp added in v0.0.3

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

func (*Gebura) UpdateApp added in v0.0.2

func (g *Gebura) UpdateApp(ctx context.Context, app *App) *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 {
	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)
}

type Paging

type Paging struct {
	PageSize int
	PageNum  int
}

Jump to

Keyboard shortcuts

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