Documentation ¶
Index ¶
- func JSONError(rw http.ResponseWriter, code int, errMsg string)
- func JSONErrorf(rw http.ResponseWriter, code int, errMsg string, args ...interface{})
- func JSONInternalServerError(rw http.ResponseWriter)
- func NotFound(rw http.ResponseWriter, _ *http.Request)
- func PanicHandler(rw http.ResponseWriter, req *http.Request, err interface{})
- type Handlers
- func (h Handlers) Create(rw http.ResponseWriter, req *http.Request)
- func (h Handlers) Delete(rw http.ResponseWriter, req *http.Request)
- func (h Handlers) Download(rw http.ResponseWriter, req *http.Request)
- func (h Handlers) Get(rw http.ResponseWriter, req *http.Request)
- func (h Handlers) List(rw http.ResponseWriter, req *http.Request)
- func (h Handlers) Update(rw http.ResponseWriter, req *http.Request)
- func (h Handlers) Validate(rw http.ResponseWriter, req *http.Request)
- type PluginStorer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONError ¶
func JSONError(rw http.ResponseWriter, code int, errMsg string)
JSONError handles an JSON error.
func JSONErrorf ¶
func JSONErrorf(rw http.ResponseWriter, code int, errMsg string, args ...interface{})
JSONErrorf handles an JSON error.
func JSONInternalServerError ¶
func JSONInternalServerError(rw http.ResponseWriter)
JSONInternalServerError handles an JSON InternalServerError.
func NotFound ¶
func NotFound(rw http.ResponseWriter, _ *http.Request)
NotFound a not found handler.
func PanicHandler ¶
func PanicHandler(rw http.ResponseWriter, req *http.Request, err interface{})
PanicHandler handles panics.
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers a set of handlers.
func (Handlers) Create ¶
func (h Handlers) Create(rw http.ResponseWriter, req *http.Request)
Create creates a plugin.
func (Handlers) Delete ¶
func (h Handlers) Delete(rw http.ResponseWriter, req *http.Request)
Delete deletes an instance info.
func (Handlers) Download ¶
func (h Handlers) Download(rw http.ResponseWriter, req *http.Request)
Download a plugin archive.
func (Handlers) Get ¶
func (h Handlers) Get(rw http.ResponseWriter, req *http.Request)
Get gets a plugin.
func (Handlers) List ¶
func (h Handlers) List(rw http.ResponseWriter, req *http.Request)
List gets a list of plugins.
type PluginStorer ¶
type PluginStorer interface { Get(ctx context.Context, id string) (db.Plugin, error) Delete(ctx context.Context, id string) error Create(context.Context, db.Plugin) (db.Plugin, error) List(context.Context, db.Pagination) ([]db.Plugin, string, error) GetByName(context.Context, string, bool, bool) (db.Plugin, error) SearchByName(context.Context, string, db.Pagination) ([]db.Plugin, string, error) Update(context.Context, string, db.Plugin) (db.Plugin, error) CreateHash(ctx context.Context, module, version, hash string) (db.PluginHash, error) GetHashByName(ctx context.Context, module, version string) (db.PluginHash, error) }
PluginStorer is capable of storing plugins.
Click to show internal directories.
Click to hide internal directories.