Documentation
¶
Index ¶
- func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter(routers ...Router) *mux.Router
- func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)
- type Backup
- type BackupList
- type BackupRequest
- type Database
- type EnvVar
- type Grant
- type ListDatabases
- type ListUsers
- type Message
- type Route
- type Router
- type Routes
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeJSONResponse ¶
func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
Types ¶
type Backup ¶
type Backup struct {
Identifier string `json:"identifier"`
Bucket string `json:"bucket"`
Location string `json:"location"`
StartTime time.Time `json:"start_time"`
EndTime *time.Time `json:"end_time,omitempty"`
// backup status
Status string `json:"status"`
}
Backup - output for a backup request
type BackupList ¶
type BackupList struct {
Size int32 `json:"size,omitempty"`
Items []Backup `json:"items,omitempty"`
}
BackupList - The List of backups
type BackupRequest ¶
type ListDatabases ¶
type Route ¶
type Route struct {
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
A Route defines the parameters for an api endpoint
Click to show internal directories.
Click to hide internal directories.