gondole.go
author Mikael Berthe <mikael@lilotux.net>
Sun, 16 Apr 2017 13:37:37 +0200
changeset 128 a5a00fad7a32
parent 125 2bbb72b9ebf6
child 130 c450bb73f59a
permissions -rw-r--r--
Add checks for client initialization

package gondole

import (
	"errors"
)

// apiCallParams is a map with the parameters for an API call
type apiCallParams map[string]string

const (
	// GondoleVersion contains the version of the Gondole implementation
	GondoleVersion = "0.0"

	defaultInstanceURL = "https://mastodon.social"
	apiVersion         = "v1" // That is not overridable
	defaultAPIPath     = "/api/" + apiVersion

	// NoRedirect is the URI for no redirection in the App registration
	NoRedirect = "urn:ietf:wg:oauth:2.0:oob"
)

// Error codes
var (
	ErrAlreadyRegistered = errors.New("app already registered")
	ErrEntityNotFound    = errors.New("entity not found")
	ErrInvalidParameter  = errors.New("incorrect parameter")
	ErrInvalidID         = errors.New("incorrect entity ID")
)