Documentation ¶
Index ¶
- Constants
- func DisableLog()
- func UseLogger(logger slog.Logger)
- type EventEdit
- type EventNew
- type EventSetStatus
- type Records
- func (c *Records) HandleDetails(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleEdit(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleInventory(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleInventoryOrdered(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleNew(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandlePolicy(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleRecords(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleSetStatus(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleTimestamps(w http.ResponseWriter, r *http.Request)
- func (c *Records) HandleUserRecords(w http.ResponseWriter, r *http.Request)
Constants ¶
const ( // EventTypeNew is emitted when a new record is submitted. EventTypeNew = "records-new" // EventTypeEdit is emitted when a a record is edited. EventTypeEdit = "records-edit" // EventTypeSetStatus is emitted when a a record status is updated. EventTypeSetStatus = "records-setstatus" )
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type EventSetStatus ¶
EventSetStatus is the event data for the EventTypeSetStatus.
type Records ¶
type Records struct {
// contains filtered or unexported fields
}
Records is the context for the records API.
func New ¶
func New(cfg *config.Config, pdc *pdclient.Client, udb user.Database, s *sessions.Sessions, e *events.Manager) *Records
New returns a new Records context.
func (*Records) HandleDetails ¶
func (c *Records) HandleDetails(w http.ResponseWriter, r *http.Request)
HandleDetails is the request handler for the records v1 Details route.
func (*Records) HandleEdit ¶
func (c *Records) HandleEdit(w http.ResponseWriter, r *http.Request)
HandleEdit is the request handler for the records v1 Edit route.
func (*Records) HandleInventory ¶
func (c *Records) HandleInventory(w http.ResponseWriter, r *http.Request)
HandleInventory is the request handler for the records v1 Inventory route.
func (*Records) HandleInventoryOrdered ¶
func (c *Records) HandleInventoryOrdered(w http.ResponseWriter, r *http.Request)
HandleInventoryOrdered is the request handler for the records v1 InventoryOrdered route.
func (*Records) HandleNew ¶
func (c *Records) HandleNew(w http.ResponseWriter, r *http.Request)
HandleNew is the request handler for the records v1 New route.
func (*Records) HandlePolicy ¶
func (c *Records) HandlePolicy(w http.ResponseWriter, r *http.Request)
HandlePolicy is the request handler for the records v1 Policy route.
func (*Records) HandleRecords ¶
func (c *Records) HandleRecords(w http.ResponseWriter, r *http.Request)
HandleRecords is the request handler for the records v1 Records route.
func (*Records) HandleSetStatus ¶
func (c *Records) HandleSetStatus(w http.ResponseWriter, r *http.Request)
HandleSetStatus is the request handler for the records v1 SetStatus route.
func (*Records) HandleTimestamps ¶
func (c *Records) HandleTimestamps(w http.ResponseWriter, r *http.Request)
HandleTimestamps is the request handler for the records v1 Timestamps route.
func (*Records) HandleUserRecords ¶
func (c *Records) HandleUserRecords(w http.ResponseWriter, r *http.Request)
HandleUserRecords is the request handler for the records v1 UserRecords route.