Documentation ¶
Overview ¶
this package acts also as an external api to create custom provisioners
Index ¶
Constants ¶
View Source
const ( // no slashes for this PrePath in the route URL_PRE_ROUTE string = "provisioners" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provisioner ¶
type Provisioner struct { // This name appears in the frontend Name string // REST path Url string // can be a fa-* icon or path to an image Icon string // internal handler Api ProvisionerApi }
func NewProvisioner ¶
func NewProvisioner(n, i string, a ProvisionerApi) *Provisioner
func (*Provisioner) MarshalJSON ¶
func (mj *Provisioner) MarshalJSON() ([]byte, error)
func (*Provisioner) MarshalJSONBuf ¶
func (mj *Provisioner) MarshalJSONBuf(buf *bytes.Buffer) error
type ProvisionerApi ¶
type ProvisionerApi interface { // GetRoutes returns the endpoint of the route GetRoute() string // GetRouteHandler returns a handler which must manage GET, POST and DELETE methods // GET returns the config for the <form> fields and also the saved data for the inputs // POST saves the data from the input field into the rucksack GetRouteHandler() HandlerFunc }
this methods will be used to query the provisioner instance and set values
type ProvisionerJsonIf ¶
type Provisioners ¶
type Provisioners struct {
Collection []*Provisioner
}
func (*Provisioners) Add ¶
func (p *Provisioners) Add(prov *Provisioner)
func (*Provisioners) Length ¶
func (p *Provisioners) Length() int
func (*Provisioners) MarshalJSON ¶
func (mj *Provisioners) MarshalJSON() ([]byte, error)
func (*Provisioners) MarshalJSONBuf ¶
func (mj *Provisioners) MarshalJSONBuf(buf *bytes.Buffer) error
Click to show internal directories.
Click to hide internal directories.