Documentation ¶
Index ¶
- Variables
- func GetContext(key string, r *http.Request) interface{}
- func NewULID() ulid.ULID
- func Render(w http.ResponseWriter, r *http.Request, e *Envelope)
- func Request(method, url string, body []byte) ([]byte, error)
- func TimeFromFormat(s string) (time.Time, error)
- func TimeToFormat(t time.Time) string
- type Envelope
Constants ¶
This section is empty.
Variables ¶
View Source
var Layout = "02.01.2006"
Functions ¶
func GetContext ¶
func TimeToFormat ¶
Types ¶
type Envelope ¶
type Envelope struct { Success bool `json:"success"` RequestID string `json:"request_id"` Time string `json:"time"` Response interface{} `json:"response"` Error string `json:"error,omitempty"` // Message string `json:"message,omitempty"` HTTPStatusCode int `json:"-"` }
func NewEnvelope ¶
func NewEnvelope() *Envelope
func (*Envelope) SetResponse ¶
Click to show internal directories.
Click to hide internal directories.