Documentation
¶
Index ¶
- Variables
- func AboutHandler(c buffalo.Context) error
- func App() *buffalo.App
- func AuthMiddleware(next buffalo.Handler) buffalo.Handler
- func DMHealthHandler(c buffalo.Context) error
- func NewAccessToken(u models.User) (string, error)
- func NewRefreshToken(id string, untilExpire time.Duration) (string, error)
- func PMHealthHandler(c buffalo.Context) error
- func QueryHandler(c buffalo.Context) error
- func WFHandler(c buffalo.Context) error
- func WFHealthHandler(c buffalo.Context) error
- type AdditionalsResource
- type AuthResource
- type ProjectsResource
- type RefreshClaims
- type ThingsResource
- func (v ThingsResource) Assets(c buffalo.Context) error
- func (v ThingsResource) Connectivities(c buffalo.Context) error
- func (v ThingsResource) Create(c buffalo.Context) error
- func (v ThingsResource) Destroy(c buffalo.Context) error
- func (v ThingsResource) List(c buffalo.Context) error
- func (v ThingsResource) Show(c buffalo.Context) error
- func (v ThingsResource) Tokens(c buffalo.Context) error
- type UserClaims
- type UsersResource
Constants ¶
This section is empty.
Variables ¶
var ENV = envy.Get("GO_ENV", "development")
ENV is used to help switch settings based on where the application is being run. Default is "development".
Functions ¶
func AboutHandler ¶
AboutHandler is a default handler to serve up memory of 18.20.
func App ¶
App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.
func AuthMiddleware ¶
AuthMiddleware is an Authorization middleware using JWT. it validates access tokens and checks their expiration time.
func DMHealthHandler ¶
DMHealthHandler checks status of dm service. This function is mapped to the path GET /health/dm
func NewAccessToken ¶
NewAccessToken creates new access token for given user.
func NewRefreshToken ¶
NewRefreshToken creates new refresh token for given identification that does not expire until time.Now() + untilExpire.
func PMHealthHandler ¶
PMHealthHandler checks status of pm service. This function is mapped to the path GET /health/pm
func QueryHandler ¶
QueryHandler handles data queries in dm. This function is mapped to the path ANY /projects/{project_id}/things/{thing_id}/queries/{path:.+}
func WFHandler ¶
WFHandler handles weather forcecasting requests by proxies them to wf component. This function is mapped to the path POST /wf/{service}
func WFHealthHandler ¶
WFHealthHandler checks status of wf service. This function is mapped to the path GET /health/wf
Types ¶
type AdditionalsResource ¶
type AdditionalsResource struct {
}
AdditionalsResource contronls additional information on users.
type AuthResource ¶
type AuthResource struct{}
AuthResource represents login, logout and signup
func (AuthResource) Login ¶
func (a AuthResource) Login(c buffalo.Context) error
Login checks given credentials and generate jwt token This function is mapped to the path POST /login
type ProjectsResource ¶
ProjectsResource controls the users access to projects and proxies their request to pm
func (ProjectsResource) Create ¶
func (v ProjectsResource) Create(c buffalo.Context) error
Create creates new project in pm and if it successful then adds newly created project to user projects This function is mapped to the path POST /projects
func (ProjectsResource) Destroy ¶
func (v ProjectsResource) Destroy(c buffalo.Context) error
Destroy deletes given project from pm and if it successful then removes it from user projects This function is mapped to the path DELETE /projects/{proejct_id}
type RefreshClaims ¶
RefreshClaims contains required information in I1820 platform to refresh a user access token.
func (RefreshClaims) Valid ¶
func (rc RefreshClaims) Valid() error
Valid checks claims expiration time
type ThingsResource ¶
ThingsResource controls the users access to things and proxies their request to pm
func (ThingsResource) Assets ¶
func (v ThingsResource) Assets(c buffalo.Context) error
Assets handles asset requests in pm. This function is mapped to the path ANY /projects/{project_id}/things/{thing_id}/assets/{path:.+}
func (ThingsResource) Connectivities ¶
func (v ThingsResource) Connectivities(c buffalo.Context) error
Connectivities handles connectivity requests in pm. This function is mapped to the path ANY /projects/{project_id}/things/{thing_id}/connectivities/{path:.+}
func (ThingsResource) Create ¶
func (v ThingsResource) Create(c buffalo.Context) error
Create creates a new thing in pm. This function is mapped to the path POST /projects/{project_id}/things
func (ThingsResource) Destroy ¶
func (v ThingsResource) Destroy(c buffalo.Context) error
Destroy deletes given thing from pm. This function is mapped to the path DELETE /projects/{proejct_id}/things/{thing_id}
func (ThingsResource) List ¶
func (v ThingsResource) List(c buffalo.Context) error
List lists things of given project. This function is mapped to the path GET /projects/{project_id}/things
type UserClaims ¶
UserClaims contains required information in I1820 platform for logged in user.
type UsersResource ¶
type UsersResource struct {
}
UsersResource handles operations on users. These operations only available to admins.