shelf

package
v0.0.0-...-ff01a36 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LanguageIDPathParam = "languageID"
	GetShelvesEndpoint  = "{" + LanguageIDPathParam + "}/shelves/"
)
View Source
const LevelQueryParamName = "level"

Variables

This section is empty.

Functions

func Execute

func Execute[T interface{ ToCommand() any }](ctx context.Context, svc Service, cmd T) (any, error)

Types

type GetShelvesRepoAction

type GetShelvesRepoAction interface {
	GetShelves(context.Context, ShelfQuery) (Shelves, error)
}

type GetShelvesService

type GetShelvesService interface {
	GetShelves(context.Context, ShelfQuery) (Shelves, error)
}

type Repo

type Repo interface {
	GetShelvesRepoAction
}

func NewRepo

func NewRepo(cl *resty.Client) Repo

type Service

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

func NewService

func NewService(r Repo) Service

type Shelf

type Shelf struct {
	ID    uint   `json:"id"`
	Code  string `json:"code"`
	Title string `json:"title"`
	Tabs  Tabs
}

type ShelfQuery

type ShelfQuery struct {
	rest.GetDummyRequester
	entities.Pagination
	Levels   []uint
	Language string
}

func (ShelfQuery) ToPathParameter

func (s ShelfQuery) ToPathParameter() (map[string]string, error)

func (ShelfQuery) ToQuery

func (s ShelfQuery) ToQuery() (url.Values, error)

type Shelves

type Shelves []Shelf

type Tab

type Tab struct {
	ApiURL   string `json:"apiUrl"`
	Selected bool   `json:"selected"`
	Level    uint   `json:"level"`
	Display  string `json:"display"`
	Title    string `json:"title"`
}

type Tabs

type Tabs []Tab

Jump to

Keyboard shortcuts

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