Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultTimeoutClient() *http.Client
- func NewTimeoutClient(cTimeout time.Duration, rwTimeout time.Duration, useClientCerts bool) *http.Client
- type API
- type AuthResponse
- type ConnectionCredentials
- type CreateProjectRequest
- type CreateProjectResponse
- type Credentials
- type Datasource
- type DatasourceCreateRequest
- type Datasources
- type ErrorResponse
- type Project
- type Projects
- type QueryDatasourcesResponse
- type QueryProjectsResponse
- type QuerySiteResponse
- type QuerySitesResponse
- type QueryUserOnSiteResponse
- type ServerInfo
- type ServerInfoResponse
- type SigninRequest
- type Site
- type SiteUsage
- type Sites
- type Terror
- type User
Constants ¶
View Source
const API_VERSION = "2.0"
View Source
const BOUNDARY_STRING = "813e3160-3c95-11e5-a151-feff819cdc9f"
View Source
const CRLF = "\r\n"
View Source
const DEFAULT_SERVER = "http://localhost:8000"
View Source
const DELETE = "DELETE"
View Source
const GET = "GET"
View Source
const POST = "POST"
Variables ¶
View Source
var ErrDoesNotExist = errors.New("Does Not Exist")
Functions ¶
func DefaultTimeoutClient ¶
Types ¶
type API ¶
type API struct { Server string Version string Boundary string AuthToken string OmitDefaultSiteName bool DefaultSiteName string }
func DefaultApi ¶
func DefaultApi() API
type AuthResponse ¶
type AuthResponse struct {
Credentials *Credentials `json:"credentials,omitempty" xml:"credentials,omitempty"`
}
type ConnectionCredentials ¶
type ConnectionCredentials struct { Name string `json:"name,omitempty" xml:"name,attr,omitempty"` Password string `json:"password,omitempty" xml:"password,attr,omitempty"` Embed bool `json:"embed" xml:"embed,attr"` }
func NewConnectionCredentials ¶
func NewConnectionCredentials(name, password string, embed bool) ConnectionCredentials
type CreateProjectRequest ¶
type CreateProjectRequest struct {
Request Project `json:"project,omitempty" xml:"project,omitempty"`
}
func (CreateProjectRequest) XML ¶
func (req CreateProjectRequest) XML() ([]byte, error)
type CreateProjectResponse ¶
type CreateProjectResponse struct {
Project Project `json:"project,omitempty" xml:"project,omitempty"`
}
type Credentials ¶
type Credentials struct { Name string `json:"name,omitempty" xml:"name,attr,omitempty"` Password string `json:"password,omitempty" xml:"password,attr,omitempty"` Token string `json:"token,omitempty" xml:"token,attr,omitempty"` Site *Site `json:"site,omitempty" xml:"site,omitempty"` Impersonate *User `json:"user,omitempty" xml:"user,omitempty"` }
type Datasource ¶
type Datasource struct { ID string `json:"id,omitempty" xml:"id,attr,omitempty"` Name string `json:"name,omitempty" xml:"name,attr,omitempty"` Type string `json:"type,omitempty" xml:"type,attr,omitempty"` ConnectionCredentials *ConnectionCredentials `json:"connectionCredentials,omitempty" xml:"connectionCredentials,omitempty"` Project *Project `json:"project,omitempty" xml:"project,omitempty"` Owner *User `json:"owner,omitempty" xml:"owner,omitempty"` }
func (*Datasource) XML ¶
func (ds *Datasource) XML() ([]byte, error)
type DatasourceCreateRequest ¶
type DatasourceCreateRequest struct {
Request Datasource `json:"datasource,omitempty" xml:"datasource,omitempty"`
}
func (DatasourceCreateRequest) XML ¶
func (req DatasourceCreateRequest) XML() ([]byte, error)
type Datasources ¶
type Datasources struct {
Datasources []Datasource `json:"datasource,omitempty" xml:"datasource,omitempty"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error Terror `json:"error,omitempty" xml:"error,omitempty"`
}
type Project ¶
type Projects ¶
type Projects struct {
Projects []Project `json:"project,omitempty" xml:"project,omitempty"`
}
type QueryDatasourcesResponse ¶
type QueryDatasourcesResponse struct {
Datasources Datasources `json:"datasources,omitempty" xml:"datasources,omitempty"`
}
type QueryProjectsResponse ¶
type QueryProjectsResponse struct {
Projects Projects `json:"projects,omitempty" xml:"projects,omitempty"`
}
type QuerySiteResponse ¶
type QuerySiteResponse struct {
Site Site `json:"site,omitempty" xml:"site,omitempty"`
}
func (QuerySiteResponse) XML ¶
func (req QuerySiteResponse) XML() ([]byte, error)
type QuerySitesResponse ¶
type QuerySitesResponse struct {
Sites Sites `json:"sites,omitempty" xml:"sites,omitempty"`
}
func (QuerySitesResponse) XML ¶
func (req QuerySitesResponse) XML() ([]byte, error)
type QueryUserOnSiteResponse ¶
type QueryUserOnSiteResponse struct {
User User `json:"user,omitempty" xml:"user,omitempty"`
}
func (QueryUserOnSiteResponse) XML ¶
func (req QueryUserOnSiteResponse) XML() ([]byte, error)
type ServerInfo ¶
type ServerInfoResponse ¶
type ServerInfoResponse struct {
ServerInfo ServerInfo `json:"serverInfo,omitempty" xml:"serverInfo,omitempty"`
}
type SigninRequest ¶
type SigninRequest struct {
Request Credentials `json:"credentials,omitempty" xml:"credentials,omitempty"`
}
func (SigninRequest) XML ¶
func (req SigninRequest) XML() ([]byte, error)
type Site ¶
type Site struct { ID string `json:"id,omitempty" xml:"id,attr,omitempty"` Name string `json:"name,omitempty" xml:"name,attr,omitempty"` ContentUrl string `json:"contentUrl,omitempty" xml:"contentUrl,attr,omitempty"` AdminMode string `json:"adminMode,omitempty" xml:"adminMode,attr,omitempty"` UserQuota string `json:"userQuota,omitempty" xml:"userQuota,attr,omitempty"` StorageQuota int `json:"storageQuota,omitempty" xml:"storageQuota,attr,omitempty"` State string `json:"state,omitempty" xml:"state,attr,omitempty"` StatusReason string `json:"statusReason,omitempty" xml:"statusReason,attr,omitempty"` Usage *SiteUsage `json:"usage,omitempty" xml:"usage,omitempty"` }
Click to show internal directories.
Click to hide internal directories.