mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-17 04:54:51 +00:00
M3O SDK Concept
This commit is contained in:
27
context/context.go
Normal file
27
context/context.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// Package context provides a layer of abstraction above go's native context, providing access to
|
||||
// metadata which can be set by passing headers to the M3O API.
|
||||
package context
|
||||
|
||||
import "context"
|
||||
|
||||
// Context provided to a service handler
|
||||
type Context struct {
|
||||
context.Context
|
||||
}
|
||||
|
||||
// GetRequestHeader from the request
|
||||
func (c *Context) GetRequestHeader(key string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// SetRequestHeader on the context
|
||||
func (c *Context) SetRequestHeader(key, value string) {
|
||||
}
|
||||
|
||||
// SetResponseHeader on the context
|
||||
func (c *Context) SetResponseHeader(key, value string) {
|
||||
}
|
||||
|
||||
// SetResponseCode on the context
|
||||
func (c *Context) SetResponseCode(code int) {
|
||||
}
|
||||
Reference in New Issue
Block a user