import "github.com/muesli/beehive/api/resources/hives"
hives.go hives_get.go hives_response.go
type HiveInfoResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Image string `json:"image"` LogoColor string `json:"logocolor"` Options []bees.BeeOptionDescriptor `json:"options"` States []bees.StateDescriptor `json:"states"` Events []bees.EventDescriptor `json:"events"` Actions []bees.ActionDescriptor `json:"actions"` }
func PrepareHiveResponse(ctx smolder.APIContext, hive *bees.BeeFactoryInterface) HiveInfoResponse
HiveResource is the resource responsible for /hives
func (r *HiveResource) Get(ctx smolder.APIContext, request *restful.Request, response *restful.Response, params map[string][]string)
Get sends out items matching the query parameters
func (r *HiveResource) GetAuthRequired() bool
GetAuthRequired returns true because all requests need authentication
func (r *HiveResource) GetByIDs(ctx smolder.APIContext, request *restful.Request, response *restful.Response, ids []string)
GetByIDs sends out all items matching a set of IDs
func (r *HiveResource) GetByIDsAuthRequired() bool
GetByIDsAuthRequired returns true because all requests need authentication
func (r *HiveResource) GetDoc() string
GetDoc returns the description of this API endpoint
func (r *HiveResource) GetParams() []*restful.Parameter
GetParams returns the parameters supported by this API endpoint
func (r *HiveResource) Register(container *restful.Container, config smolder.APIConfig, context smolder.APIContextFactory)
Register this resource with the container to setup all the routes
func (r *HiveResource) Returns() interface{}
Returns returns the model that will be returned
type HiveResponse struct { smolder.Response Hives []HiveInfoResponse `json:"hives,omitempty"` // contains filtered or unexported fields }
HiveResponse is the common response to 'hive' requests
func (r *HiveResponse) AddHive(hive *bees.BeeFactoryInterface)
AddHive adds a hive to the response
func (r *HiveResponse) EmptyResponse() interface{}
EmptyResponse returns an empty API response for this endpoint if there's no data to respond with
func (r *HiveResponse) Init(context smolder.APIContext)
Init a new response
func (r *HiveResponse) Send(response *restful.Response)
Send responds to a request with http.StatusOK
Package hives imports 7 packages (graph) and is imported by 15 packages. Updated 2019-04-29. Refresh now. Tools for package owners.