cloud

package
v0.0.0-...-cb7d559 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AlreadyRegistered = errors.New("The userid is already registered")
	TagNotFound       = errors.New("The specified tag was not found.")
)

Functions

This section is empty.

Types

type Cloud

type Cloud interface {
	/**
	 * Registers a user.
	 */
	RegisterUser(name string, email string, password string) error

	/**
	 * Authenticates the user with the e-mail and password supplied, returns
	 * a token that can be used with the activate call.
	 */
	AuthenticateUser(email string, password string) (string, error)

	/**
	 * Activates the specified sphere.
	 */
	ActivateSphere(accessToken string, nodeId string) error

	/**
	 * Set the specified tag for the specified site. If replace is true, then
	 * the current value is updated without archiving, otherwise the current
	 * value is archived and the specified value becomes the current value.
	 */
	SetTag(accessToken string, siteId string, tag string, body interface{}, replace bool) error

	/**
	 * Unmarshals the value of the specifed tag for the specified site onto the specified body object.
	 */
	GetTag(accessToken string, siteId string, tag string, body interface{}) error
}

func CloudAPI

func CloudAPI() Cloud

type Json2Error

type Json2Error struct {
	Code    int    `json:"code"`
	Message string `json:"message,omitempty"`
}

type Json2Response

type Json2Response struct {
	Type string          `json:"type,omitempty"`
	Data json.RawMessage `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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