Documentation ¶
Index ¶
- Constants
- func AddHeaders(rc *RequestContext)
- func AddSessionHeaders(rc *RequestContext)
- type AuthStatus
- type EdgeResponseMapper
- type EventLogger
- type RequestContext
- func (rc *RequestContext) GetBody() []byte
- func (rc *RequestContext) GetEntityId() (string, error)
- func (rc *RequestContext) GetEntitySubId() (string, error)
- func (rc *RequestContext) GetId() string
- func (rc *RequestContext) GetRequest() *http.Request
- func (rc *RequestContext) GetResponseWriter() http.ResponseWriter
- func (rc *RequestContext) SetEntityId(id string)
- func (rc *RequestContext) SetEntitySubId(id string)
- type Responder
- type ResponderImpl
Constants ¶
View Source
const ( IdPropertyName = "id" SubIdPropertyName = "subId" )
View Source
const ( ApiSessionExpirationSecondsHeader = "expiration-seconds" ApiSessionExpiresAtHeader = "expires-at" ServerHeader = "server" )
Variables ¶
This section is empty.
Functions ¶
func AddHeaders ¶ added in v0.17.56
func AddHeaders(rc *RequestContext)
func AddSessionHeaders ¶ added in v0.17.56
func AddSessionHeaders(rc *RequestContext)
Types ¶
type AuthStatus ¶ added in v0.21.160
type EdgeResponseMapper ¶ added in v0.21.0
type EdgeResponseMapper struct{}
func (EdgeResponseMapper) EmptyOkData ¶ added in v0.21.0
func (EdgeResponseMapper) EmptyOkData() interface{}
func (EdgeResponseMapper) MapApiError ¶ added in v0.21.0
func (self EdgeResponseMapper) MapApiError(requestId string, apiError *errorz.ApiError) interface{}
type EventLogger ¶
type RequestContext ¶
type RequestContext struct { Responder Id string ApiSession *model.ApiSession Identity *model.Identity AuthPolicy *model.AuthPolicy AuthStatus AuthStatus ActivePermissions []string ResponseWriter http.ResponseWriter Request *http.Request SessionToken string Body []byte StartTime time.Time // contains filtered or unexported fields }
func (*RequestContext) GetBody ¶ added in v0.21.0
func (rc *RequestContext) GetBody() []byte
func (*RequestContext) GetEntityId ¶ added in v0.14.35
func (rc *RequestContext) GetEntityId() (string, error)
func (*RequestContext) GetEntitySubId ¶ added in v0.14.35
func (rc *RequestContext) GetEntitySubId() (string, error)
func (*RequestContext) GetId ¶ added in v0.21.0
func (rc *RequestContext) GetId() string
func (*RequestContext) GetRequest ¶ added in v0.21.0
func (rc *RequestContext) GetRequest() *http.Request
func (*RequestContext) GetResponseWriter ¶ added in v0.21.0
func (rc *RequestContext) GetResponseWriter() http.ResponseWriter
func (*RequestContext) SetEntityId ¶ added in v0.14.35
func (rc *RequestContext) SetEntityId(id string)
func (*RequestContext) SetEntitySubId ¶ added in v0.14.35
func (rc *RequestContext) SetEntitySubId(id string)
type Responder ¶
type Responder interface { api.Responder RespondWithOk(data interface{}, meta *rest_model.Meta) RespondWithCreatedId(id string, link rest_model.Link) }
todo: rename to Responder, remove old Responder and RequestResponder
type ResponderImpl ¶ added in v0.14.35
func NewResponder ¶ added in v0.14.35
func NewResponder(rc *RequestContext) *ResponderImpl
func (*ResponderImpl) RespondWithCreatedId ¶ added in v0.14.35
func (responder *ResponderImpl) RespondWithCreatedId(id string, link rest_model.Link)
func (*ResponderImpl) RespondWithOk ¶ added in v0.14.35
func (responder *ResponderImpl) RespondWithOk(data interface{}, meta *rest_model.Meta)
Click to show internal directories.
Click to hide internal directories.