Documentation ¶
Index ¶
- func RegisterRoutes(e *echo.Echo, db *pg.DB, enforceAuth echo.MiddlewareFunc, ...)
- type DeleteDexOptions
- type Dex
- type RetrieveDexOptions
- type Service
- func (svc *Service) CreateDex(ctx context.Context, dex *Dex) error
- func (svc *Service) DeleteDex(ctx context.Context, opts DeleteDexOptions) error
- func (svc *Service) RetrieveDex(ctx context.Context, opts RetrieveDexOptions) (*Dex, error)
- func (svc *Service) UpdateDex(ctx context.Context, dex *Dex, opts UpdateDexOptions) error
- type UpdateDexOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes(e *echo.Echo, db *pg.DB, enforceAuth echo.MiddlewareFunc, nonEnforceAuth echo.MiddlewareFunc)
RegisterRoutes takes in an Echo router and registers routes onto it.
Types ¶
type DeleteDexOptions ¶
type Dex ¶
type Dex struct { ID int `json:"id"` UserID int `json:"user_id"` Title string `json:"title"` Slug string `json:"slug"` Shiny bool `pg:",use_zero" json:"shiny"` GameID string `json:"-"` Game *games.Game `pg:"g,rel:has-one" json:"game"` DexTypeID int `json:"-"` DexType *dextypes.DexType `pg:"dt,rel:has-one" json:"dex_type"` Regional *bool `json:"regional"` Caught int `pg:"-" json:"caught"` Total int `pg:"-" json:"total"` DateCreated time.Time `json:"date_created"` DateModified time.Time `json:"date_modified"` // contains filtered or unexported fields }
func (*Dex) MarshalJSON ¶
MarshalJSON is just needed for parity testing. Once we're actually using this in production, we can remove it.
type RetrieveDexOptions ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(db *pg.DB) *Service
func (*Service) DeleteDex ¶
func (svc *Service) DeleteDex(ctx context.Context, opts DeleteDexOptions) error
func (*Service) RetrieveDex ¶
type UpdateDexOptions ¶
Click to show internal directories.
Click to hide internal directories.