Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MessageGroupNotFound = "The requested group could not be found"
MessageGroupNotFound is used when a group can not be found
var MessageUserNotFound = "The requested user could not be found"
MessageUserNotFound is used when a user can not be found
var MetaBadRequest = Meta{Status: "error", StatusCode: 400, Message: "Bad Request"}
MetaBadRequest is used for unknown errors
var MetaFailure = Meta{Status: "", StatusCode: 101, Message: "Failure"}
MetaFailure is a failure response with code 101
var MetaForbidden = Meta{Status: "", StatusCode: 104, Message: "Forbidden"}
MetaForbidden is an error response with code 104
var MetaInvalidInput = Meta{Status: "", StatusCode: 102, Message: "Invalid Input"}
MetaInvalidInput is an error response with code 102
var MetaNotFound = Meta{Status: "error", StatusCode: 998, Message: "Not Found"}
MetaNotFound is returned when trying to access not existing resources
var MetaOK = Meta{Status: "ok", StatusCode: 100, Message: "OK"}
MetaOK is the default ok response with code 100
var MetaServerError = Meta{Status: "error", StatusCode: 996, Message: "Server Error"}
MetaServerError is returned on server errors
MetaUnauthorized is returned on unauthorized requests
var MetaUnknownError = Meta{Status: "error", StatusCode: 999, Message: "Unknown Error"}
MetaUnknownError is used for unknown errors
Functions ¶
This section is empty.
Types ¶
type ConfigData ¶
type ConfigData struct { Version string `json:"version" xml:"version"` Website string `json:"website" xml:"website"` Host string `json:"host" xml:"host"` Contact string `json:"contact" xml:"contact"` SSL string `json:"ssl" xml:"ssl"` }
ConfigData holds basic config
type Groups ¶
type Groups struct {
Groups []string `json:"groups" xml:"groups>element"`
}
Groups holds group ids for the groups listing
type Meta ¶
type Meta struct { Status string `json:"status" xml:"status"` StatusCode int `json:"statuscode" xml:"statuscode"` Message string `json:"message" xml:"message"` TotalItems string `json:"totalitems,omitempty" xml:"totalitems,omitempty"` ItemsPerPage string `json:"itemsperpage,omitempty" xml:"itemsperpage,omitempty"` }
Meta holds response metadata
type Quota ¶
type Quota struct { Free int64 `json:"free" xml:"free"` Used int64 `json:"used" xml:"used"` Total int64 `json:"total" xml:"total"` Relative float32 `json:"relative" xml:"relative"` Definition string `json:"definition" xml:"definition"` }
Quota holds quota information
type SigningKey ¶
type SigningKey struct { User string `json:"user" xml:"user"` SigningKey string `json:"signing-key" xml:"signing-key"` }
SigningKey holds the Payload for a GetSigningKey response
type User ¶
type User struct { Enabled string `json:"enabled" xml:"enabled"` UserID string `json:"id" xml:"id"` // UserID is mapped to the preferred_name attribute in accounts DisplayName string `json:"display-name" xml:"display-name"` LegacyDisplayName string `json:"displayname" xml:"displayname"` Email string `json:"email" xml:"email"` Quota *Quota `json:"quota" xml:"quota"` UIDNumber int64 `json:"uidnumber" xml:"uidnumber"` GIDNumber int64 `json:"gidnumber" xml:"gidnumber"` }
User holds the payload for a GetUser response