api

package
v0.0.0-...-047296f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(e *echo.Echo, a *Api, cfg *config.Config)

Types

type Api

type Api struct {
	DB          *pg.DB
	AuthTimeout time.Duration
	Cfg         *config.Config
}

func (*Api) AddRole

func (a *Api) AddRole(c echo.Context) error

POST /api/role

func (*Api) AddTrack

func (a *Api) AddTrack(c echo.Context) error

Mostly for debug purposes not really intended for use POST /api/track

func (*Api) AddUser

func (a *Api) AddUser(c echo.Context) error

POST /api/user

func (*Api) AuthValid

func (a *Api) AuthValid(c echo.Context) error

GET /api/authvalid

func (*Api) DeleteLibraryPath

func (a *Api) DeleteLibraryPath(c echo.Context) error

GELETE /api/library/:id

func (*Api) DeleteRoleByID

func (a *Api) DeleteRoleByID(c echo.Context) error

DELETE /api/role/:id

func (*Api) DeleteTrack

func (a *Api) DeleteTrack(c echo.Context) error

DELETE /api/track/:id

func (*Api) DeleteUser

func (a *Api) DeleteUser(c echo.Context) error

DELETE /api/user/:id

func (*Api) GetLibraryPathByID

func (a *Api) GetLibraryPathByID(c echo.Context) error

GET /api/library/id/:id

func (*Api) GetLibraryPaths

func (a *Api) GetLibraryPaths(c echo.Context) error

GET /api/library

func (*Api) GetRoleByID

func (a *Api) GetRoleByID(c echo.Context) error

GET /api/role/id/:id

func (*Api) GetRoleByName

func (a *Api) GetRoleByName(c echo.Context) error

GET /api/role/name/:name

func (*Api) GetTrackByID

func (a *Api) GetTrackByID(c echo.Context) error

GET /api/track/id/:id

func (*Api) GetTracks

func (a *Api) GetTracks(c echo.Context) error

GET /api/tracks

func (*Api) GetUserByID

func (a *Api) GetUserByID(c echo.Context) error

GET /api/user/id/:id

func (*Api) GetUserByName

func (a *Api) GetUserByName(c echo.Context) error

GET /api/user/name/:name

func (*Api) GetUsers

func (a *Api) GetUsers(c echo.Context) error

GET /api/users

func (*Api) Login

func (a *Api) Login(c echo.Context) error

POST /auth

func (*Api) PutLibraryPath

func (a *Api) PutLibraryPath(c echo.Context) error

POST /api/library

func (*Api) Setup

func (a *Api) Setup(c echo.Context) error

func (*Api) UpdateRoleByID

func (a *Api) UpdateRoleByID(c echo.Context) error

PUT /api/role/:id //can not create

func (*Api) UpdateUserByID

func (a *Api) UpdateUserByID(c echo.Context) error

PUT /api/user/id/:id

func (*Api) UpdateUserByName

func (a *Api) UpdateUserByName(c echo.Context) error

PUT /api/user/name/:name

type H

type H map[string]interface{}

type Responce

type Responce struct {
	Data H     `json:"data"`
	Err  error `json:"err"`
}

Jump to

Keyboard shortcuts

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