beehive: github.com/muesli/beehive/api/resources/logs Index | Files

package logs

import "github.com/muesli/beehive/api/resources/logs"

Index

Package Files

logs.go logs_get.go logs_response.go

type LogResource Uses

type LogResource struct {
    smolder.Resource
}

LogResource is the resource responsible for /logs

func (*LogResource) Get Uses

func (r *LogResource) Get(ctx smolder.APIContext, request *restful.Request, response *restful.Response, params map[string][]string)

Get sends out items matching the query parameters

func (*LogResource) GetAuthRequired Uses

func (r *LogResource) GetAuthRequired() bool

GetAuthRequired returns true because all requests need authentication

func (*LogResource) GetByIDsAuthRequired Uses

func (r *LogResource) GetByIDsAuthRequired() bool

GetByIDsAuthRequired returns true because all requests need authentication

func (*LogResource) GetDoc Uses

func (r *LogResource) GetDoc() string

GetDoc returns the description of this API endpoint

func (*LogResource) GetParams Uses

func (r *LogResource) GetParams() []*restful.Parameter

GetParams returns the parameters supported by this API endpoint

func (*LogResource) Register Uses

func (r *LogResource) Register(container *restful.Container, config smolder.APIConfig, context smolder.APIContextFactory)

Register this resource with the container to setup all the routes

func (*LogResource) Returns Uses

func (r *LogResource) Returns() interface{}

Returns returns the model that will be returned

type LogResponse Uses

type LogResponse struct {
    smolder.Response

    Logs []logInfoResponse `json:"logs,omitempty"`
    // contains filtered or unexported fields
}

LogResponse is the common response to 'log' requests

func (*LogResponse) AddLog Uses

func (r *LogResponse) AddLog(log *bees.LogMessage)

AddLog adds a log to the response

func (*LogResponse) EmptyResponse Uses

func (r *LogResponse) EmptyResponse() interface{}

EmptyResponse returns an empty API response for this endpoint if there's no data to respond with

func (*LogResponse) Init Uses

func (r *LogResponse) Init(context smolder.APIContext)

Init a new response

Package logs imports 4 packages (graph) and is imported by 3 packages. Updated 2019-05-04. Refresh now. Tools for package owners.