Documentation ¶
Overview ¶
Package addon provides an API for Instio addons to interface with the system
Index ¶
- Constants
- Variables
- func ContentAll(namespace string) []byte
- func Deregister(key string) error
- func Disable(key string) error
- func Enable(key string) error
- func Get(endpoint string) ([]byte, error)
- func KeyFromMeta(meta Meta) (string, error)
- func Manage(data []byte, reverseDNS string) ([]byte, error)
- func Query(namespace string, opts QueryOptions) []byte
- type Addon
- type Meta
- type QueryOptions
Constants ¶
const ( // StatusEnabled defines string status for Addon enabled state StatusEnabled = "enabled" // StatusDisabled defines string status for Addon disabled state StatusDisabled = "disabled" )
Variables ¶
var ( // Types is a record of addons, like content types, of addon_reverse_dns:interface{} Types = make(map[string]func() interface{}) )
Functions ¶
func ContentAll ¶
ContentAll retrieves all items from the HTTP API within the provided namespace.
func Deregister ¶
Deregister removes an addon from the system. `key` is the addon_reverse_dns
func KeyFromMeta ¶
KeyFromMeta creates a unique string identifier for an addon based on its url and name
func Query ¶
func Query(namespace string, opts QueryOptions) []byte
Query retrieves a set of content from the HTTP API based on options and returns the total number of content in the namespace and the content.
Types ¶
type Addon ¶
Addon contains information about a provided addon to the system
type Meta ¶
type Meta struct { InstioAddonName string `json:"addon_name"` InstioAddonAuthor string `json:"addon_author"` InstioAddonAuthorURL string `json:"addon_author_url"` InstioAddonVersion string `json:"addon_version"` InstioAddonReverseDNS string `json:"addon_reverse_dns"` InstioAddonStatus string `json:"addon_status"` }
Meta contains the basic information about the addon
type QueryOptions ¶
type QueryOptions db.QueryOptions
QueryOptions is a mirror of the same struct in db package and are re-declared here only to make the API simpler for the caller.