Documentation ¶
Index ¶
- Constants
- func AddHeaders(rc *RequestContext)
- func AddSessionHeaders(rc *RequestContext)
- func GetApiEnrollmentVersion() string
- func GetApiVersion() string
- 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) NewChangeContext() *change.Context
- 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 ¶
func AddHeaders(rc *RequestContext)
func AddSessionHeaders ¶
func AddSessionHeaders(rc *RequestContext)
func GetApiEnrollmentVersion ¶
func GetApiEnrollmentVersion() string
func GetApiVersion ¶
func GetApiVersion() string
Types ¶
type EdgeResponseMapper ¶
type EdgeResponseMapper struct{}
func (EdgeResponseMapper) EmptyOkData ¶
func (EdgeResponseMapper) EmptyOkData() interface{}
func (EdgeResponseMapper) MapApiError ¶
func (self EdgeResponseMapper) MapApiError(requestId string, apiError *errorz.ApiError) interface{}
type EventLogger ¶
type RequestContext ¶
type RequestContext struct { Responder // The unique id of the current request Id string // An opaque session token SessionToken string Jwt *jwt.Token Claims *oidc_auth.AccessClaims ApiSession *model.ApiSession Identity *model.Identity AuthPolicy *model.AuthPolicy AuthQueries rest_model.AuthQueryList ActivePermissions []string ResponseWriter http.ResponseWriter Request *http.Request Body []byte StartTime time.Time // contains filtered or unexported fields }
func (*RequestContext) GetBody ¶
func (rc *RequestContext) GetBody() []byte
func (*RequestContext) GetEntityId ¶
func (rc *RequestContext) GetEntityId() (string, error)
func (*RequestContext) GetEntitySubId ¶
func (rc *RequestContext) GetEntitySubId() (string, error)
func (*RequestContext) GetId ¶
func (rc *RequestContext) GetId() string
func (*RequestContext) GetRequest ¶
func (rc *RequestContext) GetRequest() *http.Request
func (*RequestContext) GetResponseWriter ¶
func (rc *RequestContext) GetResponseWriter() http.ResponseWriter
func (*RequestContext) NewChangeContext ¶
func (rc *RequestContext) NewChangeContext() *change.Context
func (*RequestContext) SetEntityId ¶
func (rc *RequestContext) SetEntityId(id string)
func (*RequestContext) SetEntitySubId ¶
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 ¶
func NewResponder ¶
func NewResponder(rc *RequestContext) *ResponderImpl
func (*ResponderImpl) RespondWithCreatedId ¶
func (responder *ResponderImpl) RespondWithCreatedId(id string, link rest_model.Link)
func (*ResponderImpl) RespondWithOk ¶
func (responder *ResponderImpl) RespondWithOk(data interface{}, meta *rest_model.Meta)
Click to show internal directories.
Click to hide internal directories.