Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHTTPRequestIsMissing = fmt.Errorf("request is missing") ErrInvalidHTTPRequestPath = fmt.Errorf("invalid HTTP request path") ErrAppNameIsMissing = fmt.Errorf("application name is missing in the context object") ErrResourceTypeIsMissing = fmt.Errorf("resource type is missing in the context object") )
Functions ¶
Types ¶
type OperationType ¶
type OperationType int
const ( CreateOperation OperationType = iota ReplaceOperation UpdateOperation DeleteOperation ReadOperation ListOperation UnknownOperation )
func GetOperationTypeFromRequest ¶
func GetOperationTypeFromRequest(r *http.Request, hasIdentifier bool) OperationType
func (OperationType) String ¶
func (o OperationType) String() string
type RequestInfo ¶
type RequestInfo struct { Identifier resource.Identifier OperationType OperationType }
func FromContext ¶
func FromContext(ctx context.Context) (RequestInfo, error)
func NewRequestInfo ¶
func NewRequestInfo(r *http.Request) (RequestInfo, error)
Click to show internal directories.
Click to hide internal directories.