Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeGetAppInfoEndpoint ¶
MakeGetAppInfoEndpoint returns an endpoint via the passed service. Primarily useful in a server.
Types ¶
type AppInfo ¶
type AppInfo struct { UserInfo UserInfo `json:"userInfo"` VersionInfo VersionInfo `json:"versionInfo"` }
AppInfo provides information of the authenticated user and application meta-data swagger:model
type GetAppInfoRequest ¶
GetAppInfoRequest combines the necessary parameters for a appinfo request
type GetAppInfoResponse ¶
GetAppInfoResponse is the appinfo response object
func (GetAppInfoResponse) Failed ¶
func (r GetAppInfoResponse) Failed() error
Failed implements endpoint.Failer.
type Service ¶
type Service interface { // GetAppInfo returns meta-data of the application and the currently loged-in user GetAppInfo(user *security.User) (ai AppInfo, err error) }
Service defines the appinfo methods
type ServiceMiddleware ¶
ServiceMiddleware describes a service (as opposed to endpoint) middleware. it is used to intercept the method execution and perform actions before/after the serivce method execution
func ServiceLoggingMiddleware ¶
func ServiceLoggingMiddleware(logger logging.Logger) ServiceMiddleware
ServiceLoggingMiddleware takes a logger as a dependency and returns a ServiceLoggingMiddleware.
type UserInfo ¶
type UserInfo struct { // DisplayName of authenticated user DisplayName string `json:"displayName"` // UserID of authenticated user UserID string `json:"userId"` // UserName of authenticated user UserName string `json:"userName"` // Email of authenticated user Email string `json:"email"` // Roles the authenticated user possesses Roles []string `json:"roles"` }
UserInfo provides information about authenticated user
type VersionInfo ¶
type VersionInfo struct { // Version of the application Version string `json:"version"` // BuildNumber defines the specific build BuildNumber string `json:"buildNumber"` }
VersionInfo contains application meta-data