Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthUsersPath = "/api/v1/auth/users" AuthUserPath = "/api/v1/auth/users/{username}" AuthUserAclPath = "/api/v1/auth/users/{username}/acl" AuthUserAclFilterPath = "/api/v1/auth/users/{username}/acl/{filter...}" )
View Source
const ( MqttGetOverallPath = "/api/v1/mqtt/stat/overall" MqttGetOnlinePath = "/api/v1/mqtt/stat/online" MqttGetClientPath = "/api/v1/mqtt/clients/{id}" MqttGetClientsPath = "/api/v1/mqtt/clients" MqttGetSubscriptionsPath = "/api/v1/mqtt/subscriptions" MqttGetTopicsPath = "/api/v1/mqtt/topics" MqttGetRetainedPath = "/api/v1/mqtt/retained" MqttDelRetainedPath = "/api/v1/mqtt/retained/{topic...}" MqttDisconnectClientPath = "/api/v1/mqtt/clients/{id}/disconnect" MqttGetBlacklistPath = "/api/v1/mqtt/blacklist" MqttAddBlacklistPath = "/api/v1/mqtt/blacklist/{id}" MqttDelBlacklistPath = "/api/v1/mqtt/blacklist/{id}" MqttPublishMessagePath = "/api/v1/mqtt/message" MqttGetConfigPath = "/api/v1/mqtt/config" PrometheusMetrics = "/metrics" )
Variables ¶
This section is empty.
Functions ¶
func Ok ¶
func Ok(w http.ResponseWriter, data any)
Types ¶
type AuthManager ¶ added in v2.6.3
type AuthManager struct {
// contains filtered or unexported fields
}
func NewAuthManager ¶ added in v2.6.3
func NewAuthManager(rdb redis.UniversalClient, authKey, aclPrefix string) *AuthManager
func (*AuthManager) GenHandlers ¶ added in v2.6.3
func (m *AuthManager) GenHandlers() map[string]Handler
type PagedRequest ¶ added in v2.6.3
type PagedResponse ¶ added in v2.6.3
type PagedResponse[T any] struct { Items []T `json:"items"` Total int `json:"total"` Page int `json:"page"` PageSize int `json:"page_size"` }
func Paginate ¶ added in v2.6.3
func Paginate[T any](items []T, req PagedRequest) PagedResponse[T]
type Rest ¶
type Rest struct {
// contains filtered or unexported fields
}
func (*Rest) GenHandlers ¶
Click to show internal directories.
Click to hide internal directories.