Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevelGet ¶ added in v0.48.0
type LogLevelGet struct {
DefaultLevel string `json:"default_level,omitempty"`
Level string `json:"level"`
ExpiresAt string `json:"expires_at,omitempty"` // Optional field, can be omitted
}
LogLevelGet represents the response body for getting the current log level.
type LogLevelPost ¶ added in v0.48.0
LogLevelPost represents the request body for setting a new log level.
type LogLevelResource ¶ added in v0.48.0
type LogLevelResource struct {
LogSetter dnh.LogLevelSetter
Logger zerolog.Logger
}
LogLevelResource is an HTTP resource that allows getting and setting the global log level.
func NewLogLevelResource ¶ added in v0.48.0
func NewLogLevelResource(logger zerolog.Logger) *LogLevelResource
NewLogLevelResource creates a new log level resource.
func (*LogLevelResource) GetIndex ¶ added in v0.48.0
func (dr *LogLevelResource) GetIndex() http.HandlerFunc
GetIndex returns an HTTP handler for getting the current log level.
func (*LogLevelResource) Handler ¶ added in v0.55.0
func (dr *LogLevelResource) Handler() http.Handler
Handler returns the HTTP handler containing the log level resource endpoints.
func (*LogLevelResource) PostIndex ¶ added in v0.48.0
func (dr *LogLevelResource) PostIndex() http.HandlerFunc
PostIndex returns an HTTP handler for setting the log level.
func (*LogLevelResource) Status ¶ added in v0.48.0
func (dr *LogLevelResource) Status() (any, error)
Status returns the status of the log level resource.
type LogLevelResourceStatus ¶ added in v0.48.0
type LogLevelResourceStatus struct {
Status string
}
LogLevelResourceStatus represents the status of the log level resource.
Click to show internal directories.
Click to hide internal directories.