dextypes

package
v1.31.5-0...-ff97089 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(e *echo.Echo, db *pg.DB, nonEnforceAuth echo.MiddlewareFunc)

RegisterRoutes takes in an Echo router and registers routes onto it.

Types

type DexType

type DexType struct {
	ID            int                        `json:"id"`
	Name          string                     `json:"name"`
	Description   *string                    `json:"description,omitempty"`
	GameFamilyID  string                     `json:"game_family_id"`
	GameFamily    *games.GameFamily          `pg:"gf,rel:has-one" json:"-"`
	Order         int                        `json:"order"`
	Tags          []string                   `pg:",array" json:"tags"`
	BaseDexTypeID *int                       `json:"base_dex_type_id,omitempty"`
	BaseDexType   *DexType                   `json:"base_dex_type,omitempty"`
	Pokemon       []*pokemoncaptures.Pokemon `pg:"p,many2many:dex_types_pokemon" json:"-"`
	// contains filtered or unexported fields
}

type DexTypePokemon

type DexTypePokemon struct {
	DexTypeID int     `json:"dex_type_id"`
	PokemonID int     `json:"pokemon_id"`
	Box       *string `json:"box"`
	Order     int     `json:"order"`
	DexNumber int     `json:"dex_number"`
	// contains filtered or unexported fields
}

type RetrieveDexTypeOptions

type RetrieveDexTypeOptions struct {
	ID                *int
	IncludeGameFamily bool
}

type Service

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

func NewService

func NewService(db *pg.DB) *Service

func (*Service) ListDexTypes

func (svc *Service) ListDexTypes(ctx context.Context) ([]*DexType, error)

func (*Service) RetrieveDexType

func (svc *Service) RetrieveDexType(ctx context.Context, opts RetrieveDexTypeOptions) (*DexType, error)

Jump to

Keyboard shortcuts

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