data

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MessageGroupNotFound = "The requested group could not be found"

MessageGroupNotFound is used when a group can not be found

View Source
var MessageUserNotFound = "The requested user could not be found"

MessageUserNotFound is used when a user can not be found

View Source
var MetaBadRequest = Meta{Status: "error", StatusCode: 400, Message: "Bad Request"}

MetaBadRequest is used for unknown errors

View Source
var MetaFailure = Meta{Status: "", StatusCode: 101, Message: "Failure"}

MetaFailure is a failure response with code 101

View Source
var MetaForbidden = Meta{Status: "", StatusCode: 104, Message: "Forbidden"}

MetaForbidden is an error response with code 104

View Source
var MetaInvalidInput = Meta{Status: "", StatusCode: 102, Message: "Invalid Input"}

MetaInvalidInput is an error response with code 102

View Source
var MetaNotFound = Meta{Status: "error", StatusCode: 998, Message: "Not Found"}

MetaNotFound is returned when trying to access not existing resources

View Source
var MetaOK = Meta{Status: "ok", StatusCode: 100, Message: "OK"}

MetaOK is the default ok response with code 100

View Source
var MetaServerError = Meta{Status: "error", StatusCode: 996, Message: "Server Error"}

MetaServerError is returned on server errors

View Source
var MetaUnauthorized = Meta{Status: "error", StatusCode: 997, Message: "Unauthorised"}

MetaUnauthorized is returned on unauthorized requests

View Source
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

type Users

type Users struct {
	Users []string `json:"users" xml:"users>element"`
}

Users holds user ids for the user listing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL