Documentation
¶
Overview ¶
Package httpapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- Constants
- func ClientIPFromContext(ctx context.Context) (string, bool)
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func WithClientIP(ctx context.Context, ip string) context.Context
- type AccessLogCountryStats
- type AccessLogResponse
- type AccessLogRow
- type AddAddress200JSONResponse
- type AddAddress201JSONResponse
- type AddAddress400JSONResponse
- type AddAddress404JSONResponse
- type AddAddress500JSONResponse
- type AddAddressJSONRequestBody
- type AddAddressRequest
- type AddAddressRequestObject
- type AddAddressResponseObject
- type Address
- type AddressHistoryBucket
- type AddressHistoryEvent
- type AddressHistoryEventSource
- type AddressHistoryResponse
- type AuthRequest
- type ChangePassword204Response
- type ChangePassword400JSONResponse
- type ChangePassword401JSONResponse
- type ChangePassword500JSONResponse
- type ChangePasswordJSONRequestBody
- type ChangePasswordRequest
- type ChangePasswordRequestObject
- type ChangePasswordResponseObject
- type ChiServerOptions
- type ContextKey
- type CreateDevice201JSONResponse
- type CreateDevice400JSONResponse
- type CreateDevice409JSONResponse
- type CreateDevice500JSONResponse
- type CreateDeviceJSONRequestBody
- type CreateDeviceRequest
- type CreateDeviceRequestObject
- type CreateDeviceResponse
- type CreateDeviceResponseObject
- type CreateUser201JSONResponse
- type CreateUser400JSONResponse
- type CreateUser401JSONResponse
- type CreateUser403Response
- type CreateUser409JSONResponse
- type CreateUser500JSONResponse
- type CreateUserJSONRequestBody
- type CreateUserRequest
- type CreateUserRequestObject
- type CreateUserResponseObject
- type DashboardServiceCount
- type DashboardServicesResponse
- type DashboardStats
- type DashboardTopDeniedIp
- type DashboardTopDeniedIpsResponse
- type DashboardTrafficBucket
- type DashboardTrafficResponse
- type DeleteDevice204Response
- type DeleteDevice404JSONResponse
- type DeleteDevice500JSONResponse
- type DeleteDeviceRequestObject
- type DeleteDeviceResponseObject
- type DeleteUser204Response
- type DeleteUser401JSONResponse
- type DeleteUser403JSONResponse
- type DeleteUser404JSONResponse
- type DeleteUser500JSONResponse
- type DeleteUserRequestObject
- type DeleteUserResponseObject
- type DemoteUser200JSONResponse
- type DemoteUser401JSONResponse
- type DemoteUser403JSONResponse
- type DemoteUser404JSONResponse
- type DemoteUser500JSONResponse
- type DemoteUserRequestObject
- type DemoteUserResponseObject
- type Device
- type DeviceAddressLeaseRule
- type DeviceHeartbeat200JSONResponse
- type DeviceHeartbeat201JSONResponse
- type DeviceHeartbeat400JSONResponse
- type DeviceHeartbeat404JSONResponse
- type DeviceHeartbeat500JSONResponse
- type DeviceHeartbeatByAPIKey200JSONResponse
- type DeviceHeartbeatByAPIKey201JSONResponse
- type DeviceHeartbeatByAPIKey400JSONResponse
- type DeviceHeartbeatByAPIKey404JSONResponse
- type DeviceHeartbeatByAPIKey500JSONResponse
- type DeviceHeartbeatByAPIKeyJSONRequestBody
- type DeviceHeartbeatByAPIKeyRequestObject
- type DeviceHeartbeatByAPIKeyResponseObject
- type DeviceHeartbeatByApiKeyRequest
- type DeviceHeartbeatRequestObject
- type DeviceHeartbeatResponseObject
- type DisableAddress200JSONResponse
- type DisableAddress400JSONResponse
- type DisableAddress404JSONResponse
- type DisableAddress500JSONResponse
- type DisableAddressRequestObject
- type DisableAddressResponseObject
- type DisableDeviceAddressLeaseRule204Response
- type DisableDeviceAddressLeaseRule404JSONResponse
- type DisableDeviceAddressLeaseRule500JSONResponse
- type DisableDeviceAddressLeaseRuleRequestObject
- type DisableDeviceAddressLeaseRuleResponseObject
- type DisplayName
- type ErrorResponse
- type GetAccessLog200JSONResponse
- type GetAccessLog401JSONResponse
- type GetAccessLog403JSONResponse
- type GetAccessLog500JSONResponse
- type GetAccessLogByCountry200JSONResponse
- type GetAccessLogByCountry401JSONResponse
- type GetAccessLogByCountry403JSONResponse
- type GetAccessLogByCountry500JSONResponse
- type GetAccessLogByCountryParams
- type GetAccessLogByCountryRequestObject
- type GetAccessLogByCountryResponseObject
- type GetAccessLogDenyReasons200JSONResponse
- type GetAccessLogDenyReasons401JSONResponse
- type GetAccessLogDenyReasons403JSONResponse
- type GetAccessLogDenyReasons500JSONResponse
- type GetAccessLogDenyReasonsRequestObject
- type GetAccessLogDenyReasonsResponseObject
- type GetAccessLogParams
- type GetAccessLogRequestObject
- type GetAccessLogResponseObject
- type GetAddressHistory200JSONResponse
- type GetAddressHistory400JSONResponse
- type GetAddressHistory500JSONResponse
- type GetAddressHistoryParams
- type GetAddressHistoryParamsGranularity
- type GetAddressHistoryParamsSource
- type GetAddressHistoryRequestObject
- type GetAddressHistoryResponseObject
- type GetCurrentUser200JSONResponse
- type GetCurrentUser401JSONResponse
- type GetCurrentUser500JSONResponse
- type GetCurrentUserRequestObject
- type GetCurrentUserResponseObject
- type GetDashboardServices200JSONResponse
- type GetDashboardServices401JSONResponse
- type GetDashboardServices500JSONResponse
- type GetDashboardServicesParams
- type GetDashboardServicesRequestObject
- type GetDashboardServicesResponseObject
- type GetDashboardStats200JSONResponse
- type GetDashboardStats401JSONResponse
- type GetDashboardStats500JSONResponse
- type GetDashboardStatsParams
- type GetDashboardStatsRequestObject
- type GetDashboardStatsResponseObject
- type GetDashboardTopDeniedIps200JSONResponse
- type GetDashboardTopDeniedIps401JSONResponse
- type GetDashboardTopDeniedIps500JSONResponse
- type GetDashboardTopDeniedIpsParams
- type GetDashboardTopDeniedIpsRequestObject
- type GetDashboardTopDeniedIpsResponseObject
- type GetDashboardTraffic200JSONResponse
- type GetDashboardTraffic401JSONResponse
- type GetDashboardTraffic500JSONResponse
- type GetDashboardTrafficParams
- type GetDashboardTrafficParamsGranularity
- type GetDashboardTrafficRequestObject
- type GetDashboardTrafficResponseObject
- type GetDevice200JSONResponse
- type GetDevice404JSONResponse
- type GetDevice500JSONResponse
- type GetDeviceAddressLeaseRule200JSONResponse
- type GetDeviceAddressLeaseRule404JSONResponse
- type GetDeviceAddressLeaseRule500JSONResponse
- type GetDeviceAddressLeaseRuleRequestObject
- type GetDeviceAddressLeaseRuleResponseObject
- type GetDeviceAddresses200JSONResponse
- type GetDeviceAddresses400JSONResponse
- type GetDeviceAddresses404JSONResponse
- type GetDeviceAddresses500JSONResponse
- type GetDeviceAddressesRequestObject
- type GetDeviceAddressesResponseObject
- type GetDeviceRequestObject
- type GetDeviceResponseObject
- type GetDevices200JSONResponse
- type GetDevices500JSONResponse
- type GetDevicesRequestObject
- type GetDevicesResponseObject
- type ID
- type IPAddress
- type InvalidParamFormatError
- type ListUsers200JSONResponse
- type ListUsers401JSONResponse
- type ListUsers403Response
- type ListUsers500JSONResponse
- type ListUsersRequestObject
- type ListUsersResponseObject
- type Login200JSONResponse
- type Login200ResponseHeaders
- type Login401JSONResponse
- type Login500JSONResponse
- type LoginJSONRequestBody
- type LoginRequestObject
- type LoginResponseObject
- type Logout204Response
- type Logout204ResponseHeaders
- type LogoutRequestObject
- type LogoutResponseObject
- type MiddlewareFunc
- type Password
- type PromoteUser200JSONResponse
- type PromoteUser401JSONResponse
- type PromoteUser403JSONResponse
- type PromoteUser404JSONResponse
- type PromoteUser500JSONResponse
- type PromoteUserRequestObject
- type PromoteUserResponseObject
- type PutDeviceAddressLeaseRule200JSONResponse
- type PutDeviceAddressLeaseRule400JSONResponse
- type PutDeviceAddressLeaseRule404JSONResponse
- type PutDeviceAddressLeaseRule500JSONResponse
- type PutDeviceAddressLeaseRuleJSONRequestBody
- type PutDeviceAddressLeaseRuleRequest
- type PutDeviceAddressLeaseRuleRequestObject
- type PutDeviceAddressLeaseRuleResponseObject
- type RegenerateDeviceAPIKey200JSONResponse
- type RegenerateDeviceAPIKey404JSONResponse
- type RegenerateDeviceAPIKey500JSONResponse
- type RegenerateDeviceAPIKeyRequestObject
- type RegenerateDeviceAPIKeyResponseObject
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AddAddress(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ChangePassword(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateDevice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteDevice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DemoteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeviceHeartbeat(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeviceHeartbeatByAPIKey(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DisableAddress(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DisableDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAccessLog(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAccessLogByCountry(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAccessLogDenyReasons(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAddressHistory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCurrentUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDashboardServices(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDashboardStats(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDashboardTopDeniedIps(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDashboardTraffic(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDevice(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDeviceAddresses(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDevices(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Login(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Logout(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PromoteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) PutDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RegenerateDeviceAPIKey(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateMe(w http.ResponseWriter, r *http.Request)
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UTCTime
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) AddAddress(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) ChangePassword(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateDevice(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateUser(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DeleteDevice(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) DeleteUser(w http.ResponseWriter, r *http.Request, userId ID)
- func (_ Unimplemented) DemoteUser(w http.ResponseWriter, r *http.Request, userId ID)
- func (_ Unimplemented) DeviceHeartbeat(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) DeviceHeartbeatByAPIKey(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DisableAddress(w http.ResponseWriter, r *http.Request, deviceId ID, addressId ID)
- func (_ Unimplemented) DisableDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) GetAccessLog(w http.ResponseWriter, r *http.Request, params GetAccessLogParams)
- func (_ Unimplemented) GetAccessLogByCountry(w http.ResponseWriter, r *http.Request, params GetAccessLogByCountryParams)
- func (_ Unimplemented) GetAccessLogDenyReasons(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetAddressHistory(w http.ResponseWriter, r *http.Request, params GetAddressHistoryParams)
- func (_ Unimplemented) GetCurrentUser(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetDashboardServices(w http.ResponseWriter, r *http.Request, params GetDashboardServicesParams)
- func (_ Unimplemented) GetDashboardStats(w http.ResponseWriter, r *http.Request, params GetDashboardStatsParams)
- func (_ Unimplemented) GetDashboardTopDeniedIps(w http.ResponseWriter, r *http.Request, params GetDashboardTopDeniedIpsParams)
- func (_ Unimplemented) GetDashboardTraffic(w http.ResponseWriter, r *http.Request, params GetDashboardTrafficParams)
- func (_ Unimplemented) GetDevice(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) GetDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) GetDeviceAddresses(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) GetDevices(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListUsers(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) Login(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) Logout(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) PromoteUser(w http.ResponseWriter, r *http.Request, userId ID)
- func (_ Unimplemented) PutDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) RegenerateDeviceAPIKey(w http.ResponseWriter, r *http.Request, deviceId ID)
- func (_ Unimplemented) UpdateMe(w http.ResponseWriter, r *http.Request)
- type UnmarshalingParamError
- type UpdateMe200JSONResponse
- type UpdateMe400JSONResponse
- type UpdateMe401JSONResponse
- type UpdateMe409JSONResponse
- type UpdateMe500JSONResponse
- type UpdateMeJSONRequestBody
- type UpdateMeRequestObject
- type UpdateMeResponseObject
- type UpdateProfileRequest
- func (t UpdateProfileRequest) AsUpdateProfileRequest0() (UpdateProfileRequest0, error)
- func (t UpdateProfileRequest) AsUpdateProfileRequest1() (UpdateProfileRequest1, error)
- func (t UpdateProfileRequest) AsUpdateProfileRequest2() (UpdateProfileRequest2, error)
- func (t *UpdateProfileRequest) FromUpdateProfileRequest0(v UpdateProfileRequest0) error
- func (t *UpdateProfileRequest) FromUpdateProfileRequest1(v UpdateProfileRequest1) error
- func (t *UpdateProfileRequest) FromUpdateProfileRequest2(v UpdateProfileRequest2) error
- func (t UpdateProfileRequest) MarshalJSON() ([]byte, error)
- func (t *UpdateProfileRequest) MergeUpdateProfileRequest0(v UpdateProfileRequest0) error
- func (t *UpdateProfileRequest) MergeUpdateProfileRequest1(v UpdateProfileRequest1) error
- func (t *UpdateProfileRequest) MergeUpdateProfileRequest2(v UpdateProfileRequest2) error
- func (t *UpdateProfileRequest) UnmarshalJSON(b []byte) error
- type UpdateProfileRequest0
- type UpdateProfileRequest1
- type UpdateProfileRequest2
- type User
- type UserRole
- type Username
Constants ¶
const ( ApiKeyAuthScopes = "apiKeyAuth.Scopes" CookieAuthScopes = "cookieAuth.Scopes" )
const APIKeyAuthScope = "apiKeyAuth"
const APIKeyHeaderName = "X-API-Key"
const CookieAuthScope = "cookieAuth"
Security scopes
const HeartbeatEndpoint = "/api/v1/heartbeat"
const LoginEndpoint = "/api/v1/auth/login"
Endpoints
const SessionCookieName = "__Host-wdc_session"
Headers
const XRealIP = "X-Real-IP"
Variables ¶
This section is empty.
Functions ¶
func ClientIPFromContext ¶
ClientIPFromContext extracts the client IP address from the context.
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
Types ¶
type AccessLogCountryStats ¶
type AccessLogCountryStats struct {
Allowed int `json:"allowed"`
ContinentCode *string `json:"continent_code,omitempty"`
CountryCode string `json:"country_code"`
CountryName *string `json:"country_name,omitempty"`
Denied int `json:"denied"`
Total int `json:"total"`
}
AccessLogCountryStats defines model for AccessLogCountryStats.
type AccessLogResponse ¶
type AccessLogResponse struct {
NextCursor *ID `json:"next_cursor"`
Rows []AccessLogRow `json:"rows"`
// Total Total rows matching the current filters (excludes cursor, useful for "N results" UI)
Total int `json:"total"`
}
AccessLogResponse defines model for AccessLogResponse.
type AccessLogRow ¶
type AccessLogRow struct {
AddressId *ID `json:"address_id,omitempty"`
// Asn Autonomous System Number
Asn *int `json:"asn,omitempty"`
// AsnOrg e.g. "Cloudflare, Inc."
AsnOrg *string `json:"asn_org,omitempty"`
// ClientIp IPv4 or IPv6 address
ClientIp IPAddress `json:"client_ip"`
// ContinentCode e.g. "EU"
ContinentCode *string `json:"continent_code,omitempty"`
// CountryCode ISO 3166-1 alpha-2, e.g. "DE"
CountryCode *string `json:"country_code,omitempty"`
// CountryName e.g. "Germany"
CountryName *string `json:"country_name,omitempty"`
CreatedAt UTCTime `json:"created_at"`
DenyReason *string `json:"deny_reason,omitempty"`
DeviceId *ID `json:"device_id,omitempty"`
DeviceName *string `json:"device_name,omitempty"`
Headers map[string][]string `json:"headers"`
HttpMethod *string `json:"http_method,omitempty"`
Id ID `json:"id"`
Outcome bool `json:"outcome"`
TargetHost *string `json:"target_host,omitempty"`
TargetUri *string `json:"target_uri,omitempty"`
XffChain *string `json:"xff_chain,omitempty"`
}
AccessLogRow defines model for AccessLogRow.
type AddAddress200JSONResponse ¶
type AddAddress200JSONResponse Address
func (AddAddress200JSONResponse) VisitAddAddressResponse ¶
func (response AddAddress200JSONResponse) VisitAddAddressResponse(w http.ResponseWriter) error
type AddAddress201JSONResponse ¶
type AddAddress201JSONResponse Address
func (AddAddress201JSONResponse) VisitAddAddressResponse ¶
func (response AddAddress201JSONResponse) VisitAddAddressResponse(w http.ResponseWriter) error
type AddAddress400JSONResponse ¶
type AddAddress400JSONResponse ErrorResponse
func (AddAddress400JSONResponse) VisitAddAddressResponse ¶
func (response AddAddress400JSONResponse) VisitAddAddressResponse(w http.ResponseWriter) error
type AddAddress404JSONResponse ¶
type AddAddress404JSONResponse ErrorResponse
func (AddAddress404JSONResponse) VisitAddAddressResponse ¶
func (response AddAddress404JSONResponse) VisitAddAddressResponse(w http.ResponseWriter) error
type AddAddress500JSONResponse ¶
type AddAddress500JSONResponse ErrorResponse
func (AddAddress500JSONResponse) VisitAddAddressResponse ¶
func (response AddAddress500JSONResponse) VisitAddAddressResponse(w http.ResponseWriter) error
type AddAddressJSONRequestBody ¶
type AddAddressJSONRequestBody = AddAddressRequest
AddAddressJSONRequestBody defines body for AddAddress for application/json ContentType.
type AddAddressRequest ¶
type AddAddressRequest struct {
// Ip IPv4 or IPv6 address
Ip IPAddress `json:"ip"`
}
AddAddressRequest defines model for AddAddressRequest.
type AddAddressRequestObject ¶
type AddAddressRequestObject struct {
DeviceId ID `json:"device_id"`
Body *AddAddressJSONRequestBody
}
type AddAddressResponseObject ¶
type AddAddressResponseObject interface {
VisitAddAddressResponse(w http.ResponseWriter) error
}
type Address ¶
type Address struct {
CreatedAt UTCTime `json:"created_at"`
DeviceId ID `json:"device_id"`
// ExpiresAt UTC timestamp when this address will auto-expire, if an auto-expiry rule is enabled for the device. Null if no expiry is scheduled.
ExpiresAt *UTCTime `json:"expires_at"`
Id ID `json:"id"`
// Ip IPv4 or IPv6 address
Ip IPAddress `json:"ip"`
// IsEnabled The latest state of this address, enabled or disabled
IsEnabled bool `json:"is_enabled"`
// UpdatedAt Last time it was enabled or disabled
UpdatedAt UTCTime `json:"updated_at"`
}
Address defines model for Address.
type AddressHistoryBucket ¶
type AddressHistoryBucket struct {
// ActiveCount Maximum active IPs seen in this time bucket
ActiveCount int `json:"active_count"`
// EventCount Total address events in this time bucket
EventCount int `json:"event_count"`
Timestamp UTCTime `json:"timestamp"`
}
AddressHistoryBucket defines model for AddressHistoryBucket.
type AddressHistoryEvent ¶
type AddressHistoryEvent struct {
DeviceId ID `json:"device_id"`
// DeviceName Name of the device
DeviceName string `json:"device_name"`
Id ID `json:"id"`
// Ip IP address
Ip string `json:"ip"`
// IsEnabled Whether the address was enabled or disabled
IsEnabled bool `json:"is_enabled"`
// Source What triggered the state change
Source AddressHistoryEventSource `json:"source"`
Timestamp UTCTime `json:"timestamp"`
}
AddressHistoryEvent defines model for AddressHistoryEvent.
type AddressHistoryEventSource ¶
type AddressHistoryEventSource string
AddressHistoryEventSource What triggered the state change
const ( AddressHistoryEventSourceExpiry AddressHistoryEventSource = "expiry" AddressHistoryEventSourceHeartbeat AddressHistoryEventSource = "heartbeat" AddressHistoryEventSourceManual AddressHistoryEventSource = "manual" )
Defines values for AddressHistoryEventSource.
type AddressHistoryResponse ¶
type AddressHistoryResponse struct {
Buckets []AddressHistoryBucket `json:"buckets"`
Events []AddressHistoryEvent `json:"events"`
NextCursor *ID `json:"next_cursor"`
// TotalEvents Total number of events matching the filters (for pagination)
TotalEvents int `json:"total_events"`
}
AddressHistoryResponse defines model for AddressHistoryResponse.
type AuthRequest ¶
type AuthRequest struct {
Password Password `json:"password"`
// Username Unique username. Lowercase alphanumeric, underscores, and hyphens only. Uppercase letters are not accepted.
Username Username `json:"username"`
}
AuthRequest defines model for AuthRequest.
type ChangePassword204Response ¶
type ChangePassword204Response struct {
}
func (ChangePassword204Response) VisitChangePasswordResponse ¶
func (response ChangePassword204Response) VisitChangePasswordResponse(w http.ResponseWriter) error
type ChangePassword400JSONResponse ¶
type ChangePassword400JSONResponse ErrorResponse
func (ChangePassword400JSONResponse) VisitChangePasswordResponse ¶
func (response ChangePassword400JSONResponse) VisitChangePasswordResponse(w http.ResponseWriter) error
type ChangePassword401JSONResponse ¶
type ChangePassword401JSONResponse ErrorResponse
func (ChangePassword401JSONResponse) VisitChangePasswordResponse ¶
func (response ChangePassword401JSONResponse) VisitChangePasswordResponse(w http.ResponseWriter) error
type ChangePassword500JSONResponse ¶
type ChangePassword500JSONResponse ErrorResponse
func (ChangePassword500JSONResponse) VisitChangePasswordResponse ¶
func (response ChangePassword500JSONResponse) VisitChangePasswordResponse(w http.ResponseWriter) error
type ChangePasswordJSONRequestBody ¶
type ChangePasswordJSONRequestBody = ChangePasswordRequest
ChangePasswordJSONRequestBody defines body for ChangePassword for application/json ContentType.
type ChangePasswordRequest ¶
type ChangePasswordRequest struct {
CurrentPassword string `json:"current_password"`
Password string `json:"password"`
}
ChangePasswordRequest defines model for ChangePasswordRequest.
type ChangePasswordRequestObject ¶
type ChangePasswordRequestObject struct {
Body *ChangePasswordJSONRequestBody
}
type ChangePasswordResponseObject ¶
type ChangePasswordResponseObject interface {
VisitChangePasswordResponse(w http.ResponseWriter) error
}
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type ContextKey ¶
type ContextKey string
type CreateDevice201JSONResponse ¶
type CreateDevice201JSONResponse CreateDeviceResponse
func (CreateDevice201JSONResponse) VisitCreateDeviceResponse ¶
func (response CreateDevice201JSONResponse) VisitCreateDeviceResponse(w http.ResponseWriter) error
type CreateDevice400JSONResponse ¶
type CreateDevice400JSONResponse ErrorResponse
func (CreateDevice400JSONResponse) VisitCreateDeviceResponse ¶
func (response CreateDevice400JSONResponse) VisitCreateDeviceResponse(w http.ResponseWriter) error
type CreateDevice409JSONResponse ¶
type CreateDevice409JSONResponse ErrorResponse
func (CreateDevice409JSONResponse) VisitCreateDeviceResponse ¶
func (response CreateDevice409JSONResponse) VisitCreateDeviceResponse(w http.ResponseWriter) error
type CreateDevice500JSONResponse ¶
type CreateDevice500JSONResponse ErrorResponse
func (CreateDevice500JSONResponse) VisitCreateDeviceResponse ¶
func (response CreateDevice500JSONResponse) VisitCreateDeviceResponse(w http.ResponseWriter) error
type CreateDeviceJSONRequestBody ¶
type CreateDeviceJSONRequestBody = CreateDeviceRequest
CreateDeviceJSONRequestBody defines body for CreateDevice for application/json ContentType.
type CreateDeviceRequest ¶
type CreateDeviceRequest struct {
// Name User-friendly name for the device
Name string `json:"name"`
}
CreateDeviceRequest defines model for CreateDeviceRequest.
type CreateDeviceRequestObject ¶
type CreateDeviceRequestObject struct {
Body *CreateDeviceJSONRequestBody
}
type CreateDeviceResponse ¶
type CreateDeviceResponse struct {
// ApiKey Secret key for the device; only returned on creation or regeneration.
ApiKey string `json:"api_key"`
Device Device `json:"device"`
}
CreateDeviceResponse defines model for CreateDeviceResponse.
type CreateDeviceResponseObject ¶
type CreateDeviceResponseObject interface {
VisitCreateDeviceResponse(w http.ResponseWriter) error
}
type CreateUser201JSONResponse ¶
type CreateUser201JSONResponse User
func (CreateUser201JSONResponse) VisitCreateUserResponse ¶
func (response CreateUser201JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUser400JSONResponse ¶
type CreateUser400JSONResponse ErrorResponse
func (CreateUser400JSONResponse) VisitCreateUserResponse ¶
func (response CreateUser400JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUser401JSONResponse ¶
type CreateUser401JSONResponse ErrorResponse
func (CreateUser401JSONResponse) VisitCreateUserResponse ¶
func (response CreateUser401JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUser403Response ¶
type CreateUser403Response struct {
}
func (CreateUser403Response) VisitCreateUserResponse ¶
func (response CreateUser403Response) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUser409JSONResponse ¶
type CreateUser409JSONResponse ErrorResponse
func (CreateUser409JSONResponse) VisitCreateUserResponse ¶
func (response CreateUser409JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUser500JSONResponse ¶
type CreateUser500JSONResponse ErrorResponse
func (CreateUser500JSONResponse) VisitCreateUserResponse ¶
func (response CreateUser500JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody = CreateUserRequest
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserRequest ¶
type CreateUserRequest struct {
// DisplayName User's public name. Unicode allowed.
DisplayName DisplayName `json:"display_name"`
Email openapi_types.Email `json:"email"`
Password Password `json:"password"`
// Username Unique username. Lowercase alphanumeric, underscores, and hyphens only. Uppercase letters are not accepted.
Username Username `json:"username"`
}
CreateUserRequest defines model for CreateUserRequest.
type CreateUserRequestObject ¶
type CreateUserRequestObject struct {
Body *CreateUserJSONRequestBody
}
type CreateUserResponseObject ¶
type CreateUserResponseObject interface {
VisitCreateUserResponse(w http.ResponseWriter) error
}
type DashboardServiceCount ¶
type DashboardServiceCount struct {
AllowCount int64 `json:"allow_count"`
DenyCount int64 `json:"deny_count"`
Host string `json:"host"`
}
DashboardServiceCount defines model for DashboardServiceCount.
type DashboardServicesResponse ¶
type DashboardServicesResponse struct {
Services []DashboardServiceCount `json:"services"`
}
DashboardServicesResponse defines model for DashboardServicesResponse.
type DashboardStats ¶
type DashboardStats struct {
AllowedCount int64 `json:"allowed_count"`
DeniedCount int64 `json:"denied_count"`
TotalRequests int64 `json:"total_requests"`
UniqueIps int64 `json:"unique_ips"`
}
DashboardStats defines model for DashboardStats.
type DashboardTopDeniedIp ¶
DashboardTopDeniedIp defines model for DashboardTopDeniedIp.
type DashboardTopDeniedIpsResponse ¶
type DashboardTopDeniedIpsResponse struct {
Ips []DashboardTopDeniedIp `json:"ips"`
}
DashboardTopDeniedIpsResponse defines model for DashboardTopDeniedIpsResponse.
type DashboardTrafficBucket ¶
type DashboardTrafficBucket struct {
AllowCount int64 `json:"allow_count"`
DenyCount int64 `json:"deny_count"`
Timestamp UTCTime `json:"timestamp"`
}
DashboardTrafficBucket defines model for DashboardTrafficBucket.
type DashboardTrafficResponse ¶
type DashboardTrafficResponse struct {
Buckets []DashboardTrafficBucket `json:"buckets"`
}
DashboardTrafficResponse defines model for DashboardTrafficResponse.
type DeleteDevice204Response ¶
type DeleteDevice204Response struct {
}
func (DeleteDevice204Response) VisitDeleteDeviceResponse ¶
func (response DeleteDevice204Response) VisitDeleteDeviceResponse(w http.ResponseWriter) error
type DeleteDevice404JSONResponse ¶
type DeleteDevice404JSONResponse ErrorResponse
func (DeleteDevice404JSONResponse) VisitDeleteDeviceResponse ¶
func (response DeleteDevice404JSONResponse) VisitDeleteDeviceResponse(w http.ResponseWriter) error
type DeleteDevice500JSONResponse ¶
type DeleteDevice500JSONResponse ErrorResponse
func (DeleteDevice500JSONResponse) VisitDeleteDeviceResponse ¶
func (response DeleteDevice500JSONResponse) VisitDeleteDeviceResponse(w http.ResponseWriter) error
type DeleteDeviceRequestObject ¶
type DeleteDeviceRequestObject struct {
DeviceId ID `json:"device_id"`
}
type DeleteDeviceResponseObject ¶
type DeleteDeviceResponseObject interface {
VisitDeleteDeviceResponse(w http.ResponseWriter) error
}
type DeleteUser204Response ¶
type DeleteUser204Response struct {
}
func (DeleteUser204Response) VisitDeleteUserResponse ¶
func (response DeleteUser204Response) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUser401JSONResponse ¶
type DeleteUser401JSONResponse ErrorResponse
func (DeleteUser401JSONResponse) VisitDeleteUserResponse ¶
func (response DeleteUser401JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUser403JSONResponse ¶
type DeleteUser403JSONResponse ErrorResponse
func (DeleteUser403JSONResponse) VisitDeleteUserResponse ¶
func (response DeleteUser403JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUser404JSONResponse ¶
type DeleteUser404JSONResponse ErrorResponse
func (DeleteUser404JSONResponse) VisitDeleteUserResponse ¶
func (response DeleteUser404JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUser500JSONResponse ¶
type DeleteUser500JSONResponse ErrorResponse
func (DeleteUser500JSONResponse) VisitDeleteUserResponse ¶
func (response DeleteUser500JSONResponse) VisitDeleteUserResponse(w http.ResponseWriter) error
type DeleteUserRequestObject ¶
type DeleteUserRequestObject struct {
UserId ID `json:"user_id"`
}
type DeleteUserResponseObject ¶
type DeleteUserResponseObject interface {
VisitDeleteUserResponse(w http.ResponseWriter) error
}
type DemoteUser200JSONResponse ¶
type DemoteUser200JSONResponse User
func (DemoteUser200JSONResponse) VisitDemoteUserResponse ¶
func (response DemoteUser200JSONResponse) VisitDemoteUserResponse(w http.ResponseWriter) error
type DemoteUser401JSONResponse ¶
type DemoteUser401JSONResponse ErrorResponse
func (DemoteUser401JSONResponse) VisitDemoteUserResponse ¶
func (response DemoteUser401JSONResponse) VisitDemoteUserResponse(w http.ResponseWriter) error
type DemoteUser403JSONResponse ¶
type DemoteUser403JSONResponse ErrorResponse
func (DemoteUser403JSONResponse) VisitDemoteUserResponse ¶
func (response DemoteUser403JSONResponse) VisitDemoteUserResponse(w http.ResponseWriter) error
type DemoteUser404JSONResponse ¶
type DemoteUser404JSONResponse ErrorResponse
func (DemoteUser404JSONResponse) VisitDemoteUserResponse ¶
func (response DemoteUser404JSONResponse) VisitDemoteUserResponse(w http.ResponseWriter) error
type DemoteUser500JSONResponse ¶
type DemoteUser500JSONResponse ErrorResponse
func (DemoteUser500JSONResponse) VisitDemoteUserResponse ¶
func (response DemoteUser500JSONResponse) VisitDemoteUserResponse(w http.ResponseWriter) error
type DemoteUserRequestObject ¶
type DemoteUserRequestObject struct {
UserId ID `json:"user_id"`
}
type DemoteUserResponseObject ¶
type DemoteUserResponseObject interface {
VisitDemoteUserResponse(w http.ResponseWriter) error
}
type Device ¶
type Device struct {
// AddressCount Number of currently enabled addresses for this device.
AddressCount *int `json:"address_count,omitempty"`
// ApiKeyPrefix Prefix of the device API key (for display only).
ApiKeyPrefix string `json:"api_key_prefix"`
CreatedAt UTCTime `json:"created_at"`
Id ID `json:"id"`
// LastSeenAt Most recent address activity for this device (heartbeat or manual update).
LastSeenAt *UTCTime `json:"last_seen_at"`
// Name User-friendly name for the device
Name string `json:"name"`
}
Device defines model for Device.
type DeviceAddressLeaseRule ¶
type DeviceAddressLeaseRule struct {
CreatedAt UTCTime `json:"created_at"`
DeviceId ID `json:"device_id"`
// Enabled Whether the lease rule is active
Enabled bool `json:"enabled"`
Id ID `json:"id"`
// TtlSeconds Seconds after which an enabled device address lease expires
TtlSeconds int `json:"ttl_seconds"`
UpdatedAt UTCTime `json:"updated_at"`
}
DeviceAddressLeaseRule defines model for DeviceAddressLeaseRule.
type DeviceHeartbeat200JSONResponse ¶
type DeviceHeartbeat200JSONResponse Address
func (DeviceHeartbeat200JSONResponse) VisitDeviceHeartbeatResponse ¶
func (response DeviceHeartbeat200JSONResponse) VisitDeviceHeartbeatResponse(w http.ResponseWriter) error
type DeviceHeartbeat201JSONResponse ¶
type DeviceHeartbeat201JSONResponse Address
func (DeviceHeartbeat201JSONResponse) VisitDeviceHeartbeatResponse ¶
func (response DeviceHeartbeat201JSONResponse) VisitDeviceHeartbeatResponse(w http.ResponseWriter) error
type DeviceHeartbeat400JSONResponse ¶
type DeviceHeartbeat400JSONResponse ErrorResponse
func (DeviceHeartbeat400JSONResponse) VisitDeviceHeartbeatResponse ¶
func (response DeviceHeartbeat400JSONResponse) VisitDeviceHeartbeatResponse(w http.ResponseWriter) error
type DeviceHeartbeat404JSONResponse ¶
type DeviceHeartbeat404JSONResponse ErrorResponse
func (DeviceHeartbeat404JSONResponse) VisitDeviceHeartbeatResponse ¶
func (response DeviceHeartbeat404JSONResponse) VisitDeviceHeartbeatResponse(w http.ResponseWriter) error
type DeviceHeartbeat500JSONResponse ¶
type DeviceHeartbeat500JSONResponse ErrorResponse
func (DeviceHeartbeat500JSONResponse) VisitDeviceHeartbeatResponse ¶
func (response DeviceHeartbeat500JSONResponse) VisitDeviceHeartbeatResponse(w http.ResponseWriter) error
type DeviceHeartbeatByAPIKey200JSONResponse ¶
type DeviceHeartbeatByAPIKey200JSONResponse Address
func (DeviceHeartbeatByAPIKey200JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse ¶
func (response DeviceHeartbeatByAPIKey200JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse(w http.ResponseWriter) error
type DeviceHeartbeatByAPIKey201JSONResponse ¶
type DeviceHeartbeatByAPIKey201JSONResponse Address
func (DeviceHeartbeatByAPIKey201JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse ¶
func (response DeviceHeartbeatByAPIKey201JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse(w http.ResponseWriter) error
type DeviceHeartbeatByAPIKey400JSONResponse ¶
type DeviceHeartbeatByAPIKey400JSONResponse ErrorResponse
func (DeviceHeartbeatByAPIKey400JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse ¶
func (response DeviceHeartbeatByAPIKey400JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse(w http.ResponseWriter) error
type DeviceHeartbeatByAPIKey404JSONResponse ¶
type DeviceHeartbeatByAPIKey404JSONResponse ErrorResponse
func (DeviceHeartbeatByAPIKey404JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse ¶
func (response DeviceHeartbeatByAPIKey404JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse(w http.ResponseWriter) error
type DeviceHeartbeatByAPIKey500JSONResponse ¶
type DeviceHeartbeatByAPIKey500JSONResponse ErrorResponse
func (DeviceHeartbeatByAPIKey500JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse ¶
func (response DeviceHeartbeatByAPIKey500JSONResponse) VisitDeviceHeartbeatByAPIKeyResponse(w http.ResponseWriter) error
type DeviceHeartbeatByAPIKeyJSONRequestBody ¶
type DeviceHeartbeatByAPIKeyJSONRequestBody = DeviceHeartbeatByApiKeyRequest
DeviceHeartbeatByAPIKeyJSONRequestBody defines body for DeviceHeartbeatByAPIKey for application/json ContentType.
type DeviceHeartbeatByAPIKeyRequestObject ¶
type DeviceHeartbeatByAPIKeyRequestObject struct {
Body *DeviceHeartbeatByAPIKeyJSONRequestBody
}
type DeviceHeartbeatByAPIKeyResponseObject ¶
type DeviceHeartbeatByAPIKeyResponseObject interface {
VisitDeviceHeartbeatByAPIKeyResponse(w http.ResponseWriter) error
}
type DeviceHeartbeatByApiKeyRequest ¶
type DeviceHeartbeatByApiKeyRequest struct {
// Ip IPv4 or IPv6 address
Ip *IPAddress `json:"ip,omitempty"`
}
DeviceHeartbeatByApiKeyRequest defines model for DeviceHeartbeatByApiKeyRequest.
type DeviceHeartbeatRequestObject ¶
type DeviceHeartbeatRequestObject struct {
DeviceId ID `json:"device_id"`
}
type DeviceHeartbeatResponseObject ¶
type DeviceHeartbeatResponseObject interface {
VisitDeviceHeartbeatResponse(w http.ResponseWriter) error
}
type DisableAddress200JSONResponse ¶
type DisableAddress200JSONResponse Address
func (DisableAddress200JSONResponse) VisitDisableAddressResponse ¶
func (response DisableAddress200JSONResponse) VisitDisableAddressResponse(w http.ResponseWriter) error
type DisableAddress400JSONResponse ¶
type DisableAddress400JSONResponse ErrorResponse
func (DisableAddress400JSONResponse) VisitDisableAddressResponse ¶
func (response DisableAddress400JSONResponse) VisitDisableAddressResponse(w http.ResponseWriter) error
type DisableAddress404JSONResponse ¶
type DisableAddress404JSONResponse ErrorResponse
func (DisableAddress404JSONResponse) VisitDisableAddressResponse ¶
func (response DisableAddress404JSONResponse) VisitDisableAddressResponse(w http.ResponseWriter) error
type DisableAddress500JSONResponse ¶
type DisableAddress500JSONResponse ErrorResponse
func (DisableAddress500JSONResponse) VisitDisableAddressResponse ¶
func (response DisableAddress500JSONResponse) VisitDisableAddressResponse(w http.ResponseWriter) error
type DisableAddressResponseObject ¶
type DisableAddressResponseObject interface {
VisitDisableAddressResponse(w http.ResponseWriter) error
}
type DisableDeviceAddressLeaseRule204Response ¶
type DisableDeviceAddressLeaseRule204Response struct {
}
func (DisableDeviceAddressLeaseRule204Response) VisitDisableDeviceAddressLeaseRuleResponse ¶
func (response DisableDeviceAddressLeaseRule204Response) VisitDisableDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type DisableDeviceAddressLeaseRule404JSONResponse ¶
type DisableDeviceAddressLeaseRule404JSONResponse ErrorResponse
func (DisableDeviceAddressLeaseRule404JSONResponse) VisitDisableDeviceAddressLeaseRuleResponse ¶
func (response DisableDeviceAddressLeaseRule404JSONResponse) VisitDisableDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type DisableDeviceAddressLeaseRule500JSONResponse ¶
type DisableDeviceAddressLeaseRule500JSONResponse ErrorResponse
func (DisableDeviceAddressLeaseRule500JSONResponse) VisitDisableDeviceAddressLeaseRuleResponse ¶
func (response DisableDeviceAddressLeaseRule500JSONResponse) VisitDisableDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type DisableDeviceAddressLeaseRuleRequestObject ¶
type DisableDeviceAddressLeaseRuleRequestObject struct {
DeviceId ID `json:"device_id"`
}
type DisableDeviceAddressLeaseRuleResponseObject ¶
type DisableDeviceAddressLeaseRuleResponseObject interface {
VisitDisableDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
}
type ErrorResponse ¶
type ErrorResponse struct {
Error *string `json:"error,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type GetAccessLog200JSONResponse ¶
type GetAccessLog200JSONResponse AccessLogResponse
func (GetAccessLog200JSONResponse) VisitGetAccessLogResponse ¶
func (response GetAccessLog200JSONResponse) VisitGetAccessLogResponse(w http.ResponseWriter) error
type GetAccessLog401JSONResponse ¶
type GetAccessLog401JSONResponse ErrorResponse
func (GetAccessLog401JSONResponse) VisitGetAccessLogResponse ¶
func (response GetAccessLog401JSONResponse) VisitGetAccessLogResponse(w http.ResponseWriter) error
type GetAccessLog403JSONResponse ¶
type GetAccessLog403JSONResponse ErrorResponse
func (GetAccessLog403JSONResponse) VisitGetAccessLogResponse ¶
func (response GetAccessLog403JSONResponse) VisitGetAccessLogResponse(w http.ResponseWriter) error
type GetAccessLog500JSONResponse ¶
type GetAccessLog500JSONResponse ErrorResponse
func (GetAccessLog500JSONResponse) VisitGetAccessLogResponse ¶
func (response GetAccessLog500JSONResponse) VisitGetAccessLogResponse(w http.ResponseWriter) error
type GetAccessLogByCountry200JSONResponse ¶
type GetAccessLogByCountry200JSONResponse []AccessLogCountryStats
func (GetAccessLogByCountry200JSONResponse) VisitGetAccessLogByCountryResponse ¶
func (response GetAccessLogByCountry200JSONResponse) VisitGetAccessLogByCountryResponse(w http.ResponseWriter) error
type GetAccessLogByCountry401JSONResponse ¶
type GetAccessLogByCountry401JSONResponse ErrorResponse
func (GetAccessLogByCountry401JSONResponse) VisitGetAccessLogByCountryResponse ¶
func (response GetAccessLogByCountry401JSONResponse) VisitGetAccessLogByCountryResponse(w http.ResponseWriter) error
type GetAccessLogByCountry403JSONResponse ¶
type GetAccessLogByCountry403JSONResponse ErrorResponse
func (GetAccessLogByCountry403JSONResponse) VisitGetAccessLogByCountryResponse ¶
func (response GetAccessLogByCountry403JSONResponse) VisitGetAccessLogByCountryResponse(w http.ResponseWriter) error
type GetAccessLogByCountry500JSONResponse ¶
type GetAccessLogByCountry500JSONResponse ErrorResponse
func (GetAccessLogByCountry500JSONResponse) VisitGetAccessLogByCountryResponse ¶
func (response GetAccessLogByCountry500JSONResponse) VisitGetAccessLogByCountryResponse(w http.ResponseWriter) error
type GetAccessLogByCountryParams ¶
type GetAccessLogByCountryParams struct {
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
}
GetAccessLogByCountryParams defines parameters for GetAccessLogByCountry.
type GetAccessLogByCountryRequestObject ¶
type GetAccessLogByCountryRequestObject struct {
Params GetAccessLogByCountryParams
}
type GetAccessLogByCountryResponseObject ¶
type GetAccessLogByCountryResponseObject interface {
VisitGetAccessLogByCountryResponse(w http.ResponseWriter) error
}
type GetAccessLogDenyReasons200JSONResponse ¶
type GetAccessLogDenyReasons200JSONResponse []string
func (GetAccessLogDenyReasons200JSONResponse) VisitGetAccessLogDenyReasonsResponse ¶
func (response GetAccessLogDenyReasons200JSONResponse) VisitGetAccessLogDenyReasonsResponse(w http.ResponseWriter) error
type GetAccessLogDenyReasons401JSONResponse ¶
type GetAccessLogDenyReasons401JSONResponse ErrorResponse
func (GetAccessLogDenyReasons401JSONResponse) VisitGetAccessLogDenyReasonsResponse ¶
func (response GetAccessLogDenyReasons401JSONResponse) VisitGetAccessLogDenyReasonsResponse(w http.ResponseWriter) error
type GetAccessLogDenyReasons403JSONResponse ¶
type GetAccessLogDenyReasons403JSONResponse ErrorResponse
func (GetAccessLogDenyReasons403JSONResponse) VisitGetAccessLogDenyReasonsResponse ¶
func (response GetAccessLogDenyReasons403JSONResponse) VisitGetAccessLogDenyReasonsResponse(w http.ResponseWriter) error
type GetAccessLogDenyReasons500JSONResponse ¶
type GetAccessLogDenyReasons500JSONResponse ErrorResponse
func (GetAccessLogDenyReasons500JSONResponse) VisitGetAccessLogDenyReasonsResponse ¶
func (response GetAccessLogDenyReasons500JSONResponse) VisitGetAccessLogDenyReasonsResponse(w http.ResponseWriter) error
type GetAccessLogDenyReasonsRequestObject ¶
type GetAccessLogDenyReasonsRequestObject struct {
}
type GetAccessLogDenyReasonsResponseObject ¶
type GetAccessLogDenyReasonsResponseObject interface {
VisitGetAccessLogDenyReasonsResponse(w http.ResponseWriter) error
}
type GetAccessLogParams ¶
type GetAccessLogParams struct {
DeviceId *ID `form:"device_id,omitempty" json:"device_id,omitempty"`
Outcome *bool `form:"outcome,omitempty" json:"outcome,omitempty"`
// DenyReason Filter by deny reason (see GET /access-log/deny-reasons for valid values)
DenyReason *string `form:"deny_reason,omitempty" json:"deny_reason,omitempty"`
// Ip Exact client IP match
Ip *string `form:"ip,omitempty" json:"ip,omitempty"`
// Host Exact target host match
Host *string `form:"host,omitempty" json:"host,omitempty"`
// CountryCode ISO 3166-1 alpha-2 country code filter (e.g. "DE")
CountryCode *string `form:"country_code,omitempty" json:"country_code,omitempty"`
// ContinentCode Continent code filter (e.g. "EU")
ContinentCode *string `form:"continent_code,omitempty" json:"continent_code,omitempty"`
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
// Limit Page size (default 50, max 200)
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// BeforeId Cursor; return rows with id < before_id
BeforeId *ID `form:"before_id,omitempty" json:"before_id,omitempty"`
}
GetAccessLogParams defines parameters for GetAccessLog.
type GetAccessLogRequestObject ¶
type GetAccessLogRequestObject struct {
Params GetAccessLogParams
}
type GetAccessLogResponseObject ¶
type GetAccessLogResponseObject interface {
VisitGetAccessLogResponse(w http.ResponseWriter) error
}
type GetAddressHistory200JSONResponse ¶
type GetAddressHistory200JSONResponse AddressHistoryResponse
func (GetAddressHistory200JSONResponse) VisitGetAddressHistoryResponse ¶
func (response GetAddressHistory200JSONResponse) VisitGetAddressHistoryResponse(w http.ResponseWriter) error
type GetAddressHistory400JSONResponse ¶
type GetAddressHistory400JSONResponse ErrorResponse
func (GetAddressHistory400JSONResponse) VisitGetAddressHistoryResponse ¶
func (response GetAddressHistory400JSONResponse) VisitGetAddressHistoryResponse(w http.ResponseWriter) error
type GetAddressHistory500JSONResponse ¶
type GetAddressHistory500JSONResponse ErrorResponse
func (GetAddressHistory500JSONResponse) VisitGetAddressHistoryResponse ¶
func (response GetAddressHistory500JSONResponse) VisitGetAddressHistoryResponse(w http.ResponseWriter) error
type GetAddressHistoryParams ¶
type GetAddressHistoryParams struct {
// DeviceId Filter by device ID(s). Empty means all devices.
DeviceId *[]ID `form:"device_id,omitempty" json:"device_id,omitempty"`
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
// Granularity Time bucket granularity (default hour)
Granularity *GetAddressHistoryParamsGranularity `form:"granularity,omitempty" json:"granularity,omitempty"`
// Source Filter events by source
Source *GetAddressHistoryParamsSource `form:"source,omitempty" json:"source,omitempty"`
// IsEnabled Filter events by enabled/disabled state
IsEnabled *bool `form:"is_enabled,omitempty" json:"is_enabled,omitempty"`
// Ip Filter events by IP address (substring match)
Ip *string `form:"ip,omitempty" json:"ip,omitempty"`
// Limit Maximum number of events to return (default 50, max 200)
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// BeforeId Cursor for pagination — return events with id < before_id
BeforeId *int64 `form:"before_id,omitempty" json:"before_id,omitempty"`
// IncludeAll When false (default), returns only state-change events (created, enabled, disabled). When true, includes all events including repeated heartbeat refreshes.
IncludeAll *bool `form:"include_all,omitempty" json:"include_all,omitempty"`
}
GetAddressHistoryParams defines parameters for GetAddressHistory.
type GetAddressHistoryParamsGranularity ¶
type GetAddressHistoryParamsGranularity string
GetAddressHistoryParamsGranularity defines parameters for GetAddressHistory.
const ( GetAddressHistoryParamsGranularityDay GetAddressHistoryParamsGranularity = "day" GetAddressHistoryParamsGranularityHour GetAddressHistoryParamsGranularity = "hour" )
Defines values for GetAddressHistoryParamsGranularity.
type GetAddressHistoryParamsSource ¶
type GetAddressHistoryParamsSource string
GetAddressHistoryParamsSource defines parameters for GetAddressHistory.
const ( GetAddressHistoryParamsSourceExpiry GetAddressHistoryParamsSource = "expiry" GetAddressHistoryParamsSourceHeartbeat GetAddressHistoryParamsSource = "heartbeat" GetAddressHistoryParamsSourceManual GetAddressHistoryParamsSource = "manual" )
Defines values for GetAddressHistoryParamsSource.
type GetAddressHistoryRequestObject ¶
type GetAddressHistoryRequestObject struct {
Params GetAddressHistoryParams
}
type GetAddressHistoryResponseObject ¶
type GetAddressHistoryResponseObject interface {
VisitGetAddressHistoryResponse(w http.ResponseWriter) error
}
type GetCurrentUser200JSONResponse ¶
type GetCurrentUser200JSONResponse User
func (GetCurrentUser200JSONResponse) VisitGetCurrentUserResponse ¶
func (response GetCurrentUser200JSONResponse) VisitGetCurrentUserResponse(w http.ResponseWriter) error
type GetCurrentUser401JSONResponse ¶
type GetCurrentUser401JSONResponse ErrorResponse
func (GetCurrentUser401JSONResponse) VisitGetCurrentUserResponse ¶
func (response GetCurrentUser401JSONResponse) VisitGetCurrentUserResponse(w http.ResponseWriter) error
type GetCurrentUser500JSONResponse ¶
type GetCurrentUser500JSONResponse ErrorResponse
func (GetCurrentUser500JSONResponse) VisitGetCurrentUserResponse ¶
func (response GetCurrentUser500JSONResponse) VisitGetCurrentUserResponse(w http.ResponseWriter) error
type GetCurrentUserRequestObject ¶
type GetCurrentUserRequestObject struct {
}
type GetCurrentUserResponseObject ¶
type GetCurrentUserResponseObject interface {
VisitGetCurrentUserResponse(w http.ResponseWriter) error
}
type GetDashboardServices200JSONResponse ¶
type GetDashboardServices200JSONResponse DashboardServicesResponse
func (GetDashboardServices200JSONResponse) VisitGetDashboardServicesResponse ¶
func (response GetDashboardServices200JSONResponse) VisitGetDashboardServicesResponse(w http.ResponseWriter) error
type GetDashboardServices401JSONResponse ¶
type GetDashboardServices401JSONResponse ErrorResponse
func (GetDashboardServices401JSONResponse) VisitGetDashboardServicesResponse ¶
func (response GetDashboardServices401JSONResponse) VisitGetDashboardServicesResponse(w http.ResponseWriter) error
type GetDashboardServices500JSONResponse ¶
type GetDashboardServices500JSONResponse ErrorResponse
func (GetDashboardServices500JSONResponse) VisitGetDashboardServicesResponse ¶
func (response GetDashboardServices500JSONResponse) VisitGetDashboardServicesResponse(w http.ResponseWriter) error
type GetDashboardServicesParams ¶
type GetDashboardServicesParams struct {
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
}
GetDashboardServicesParams defines parameters for GetDashboardServices.
type GetDashboardServicesRequestObject ¶
type GetDashboardServicesRequestObject struct {
Params GetDashboardServicesParams
}
type GetDashboardServicesResponseObject ¶
type GetDashboardServicesResponseObject interface {
VisitGetDashboardServicesResponse(w http.ResponseWriter) error
}
type GetDashboardStats200JSONResponse ¶
type GetDashboardStats200JSONResponse DashboardStats
func (GetDashboardStats200JSONResponse) VisitGetDashboardStatsResponse ¶
func (response GetDashboardStats200JSONResponse) VisitGetDashboardStatsResponse(w http.ResponseWriter) error
type GetDashboardStats401JSONResponse ¶
type GetDashboardStats401JSONResponse ErrorResponse
func (GetDashboardStats401JSONResponse) VisitGetDashboardStatsResponse ¶
func (response GetDashboardStats401JSONResponse) VisitGetDashboardStatsResponse(w http.ResponseWriter) error
type GetDashboardStats500JSONResponse ¶
type GetDashboardStats500JSONResponse ErrorResponse
func (GetDashboardStats500JSONResponse) VisitGetDashboardStatsResponse ¶
func (response GetDashboardStats500JSONResponse) VisitGetDashboardStatsResponse(w http.ResponseWriter) error
type GetDashboardStatsParams ¶
type GetDashboardStatsParams struct {
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
}
GetDashboardStatsParams defines parameters for GetDashboardStats.
type GetDashboardStatsRequestObject ¶
type GetDashboardStatsRequestObject struct {
Params GetDashboardStatsParams
}
type GetDashboardStatsResponseObject ¶
type GetDashboardStatsResponseObject interface {
VisitGetDashboardStatsResponse(w http.ResponseWriter) error
}
type GetDashboardTopDeniedIps200JSONResponse ¶
type GetDashboardTopDeniedIps200JSONResponse DashboardTopDeniedIpsResponse
func (GetDashboardTopDeniedIps200JSONResponse) VisitGetDashboardTopDeniedIpsResponse ¶
func (response GetDashboardTopDeniedIps200JSONResponse) VisitGetDashboardTopDeniedIpsResponse(w http.ResponseWriter) error
type GetDashboardTopDeniedIps401JSONResponse ¶
type GetDashboardTopDeniedIps401JSONResponse ErrorResponse
func (GetDashboardTopDeniedIps401JSONResponse) VisitGetDashboardTopDeniedIpsResponse ¶
func (response GetDashboardTopDeniedIps401JSONResponse) VisitGetDashboardTopDeniedIpsResponse(w http.ResponseWriter) error
type GetDashboardTopDeniedIps500JSONResponse ¶
type GetDashboardTopDeniedIps500JSONResponse ErrorResponse
func (GetDashboardTopDeniedIps500JSONResponse) VisitGetDashboardTopDeniedIpsResponse ¶
func (response GetDashboardTopDeniedIps500JSONResponse) VisitGetDashboardTopDeniedIpsResponse(w http.ResponseWriter) error
type GetDashboardTopDeniedIpsParams ¶
type GetDashboardTopDeniedIpsParams struct {
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
// Limit Maximum number of IPs to return (default 10, max 100)
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
GetDashboardTopDeniedIpsParams defines parameters for GetDashboardTopDeniedIps.
type GetDashboardTopDeniedIpsRequestObject ¶
type GetDashboardTopDeniedIpsRequestObject struct {
Params GetDashboardTopDeniedIpsParams
}
type GetDashboardTopDeniedIpsResponseObject ¶
type GetDashboardTopDeniedIpsResponseObject interface {
VisitGetDashboardTopDeniedIpsResponse(w http.ResponseWriter) error
}
type GetDashboardTraffic200JSONResponse ¶
type GetDashboardTraffic200JSONResponse DashboardTrafficResponse
func (GetDashboardTraffic200JSONResponse) VisitGetDashboardTrafficResponse ¶
func (response GetDashboardTraffic200JSONResponse) VisitGetDashboardTrafficResponse(w http.ResponseWriter) error
type GetDashboardTraffic401JSONResponse ¶
type GetDashboardTraffic401JSONResponse ErrorResponse
func (GetDashboardTraffic401JSONResponse) VisitGetDashboardTrafficResponse ¶
func (response GetDashboardTraffic401JSONResponse) VisitGetDashboardTrafficResponse(w http.ResponseWriter) error
type GetDashboardTraffic500JSONResponse ¶
type GetDashboardTraffic500JSONResponse ErrorResponse
func (GetDashboardTraffic500JSONResponse) VisitGetDashboardTrafficResponse ¶
func (response GetDashboardTraffic500JSONResponse) VisitGetDashboardTrafficResponse(w http.ResponseWriter) error
type GetDashboardTrafficParams ¶
type GetDashboardTrafficParams struct {
// From RFC3339 start of time window (default 24h ago)
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
// To RFC3339 end of time window (default now)
To *time.Time `form:"to,omitempty" json:"to,omitempty"`
// Granularity Time bucket granularity (default hour)
Granularity *GetDashboardTrafficParamsGranularity `form:"granularity,omitempty" json:"granularity,omitempty"`
}
GetDashboardTrafficParams defines parameters for GetDashboardTraffic.
type GetDashboardTrafficParamsGranularity ¶
type GetDashboardTrafficParamsGranularity string
GetDashboardTrafficParamsGranularity defines parameters for GetDashboardTraffic.
const ( GetDashboardTrafficParamsGranularityDay GetDashboardTrafficParamsGranularity = "day" GetDashboardTrafficParamsGranularityHour GetDashboardTrafficParamsGranularity = "hour" )
Defines values for GetDashboardTrafficParamsGranularity.
type GetDashboardTrafficRequestObject ¶
type GetDashboardTrafficRequestObject struct {
Params GetDashboardTrafficParams
}
type GetDashboardTrafficResponseObject ¶
type GetDashboardTrafficResponseObject interface {
VisitGetDashboardTrafficResponse(w http.ResponseWriter) error
}
type GetDevice200JSONResponse ¶
type GetDevice200JSONResponse Device
func (GetDevice200JSONResponse) VisitGetDeviceResponse ¶
func (response GetDevice200JSONResponse) VisitGetDeviceResponse(w http.ResponseWriter) error
type GetDevice404JSONResponse ¶
type GetDevice404JSONResponse ErrorResponse
func (GetDevice404JSONResponse) VisitGetDeviceResponse ¶
func (response GetDevice404JSONResponse) VisitGetDeviceResponse(w http.ResponseWriter) error
type GetDevice500JSONResponse ¶
type GetDevice500JSONResponse ErrorResponse
func (GetDevice500JSONResponse) VisitGetDeviceResponse ¶
func (response GetDevice500JSONResponse) VisitGetDeviceResponse(w http.ResponseWriter) error
type GetDeviceAddressLeaseRule200JSONResponse ¶
type GetDeviceAddressLeaseRule200JSONResponse DeviceAddressLeaseRule
func (GetDeviceAddressLeaseRule200JSONResponse) VisitGetDeviceAddressLeaseRuleResponse ¶
func (response GetDeviceAddressLeaseRule200JSONResponse) VisitGetDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type GetDeviceAddressLeaseRule404JSONResponse ¶
type GetDeviceAddressLeaseRule404JSONResponse ErrorResponse
func (GetDeviceAddressLeaseRule404JSONResponse) VisitGetDeviceAddressLeaseRuleResponse ¶
func (response GetDeviceAddressLeaseRule404JSONResponse) VisitGetDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type GetDeviceAddressLeaseRule500JSONResponse ¶
type GetDeviceAddressLeaseRule500JSONResponse ErrorResponse
func (GetDeviceAddressLeaseRule500JSONResponse) VisitGetDeviceAddressLeaseRuleResponse ¶
func (response GetDeviceAddressLeaseRule500JSONResponse) VisitGetDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type GetDeviceAddressLeaseRuleRequestObject ¶
type GetDeviceAddressLeaseRuleRequestObject struct {
DeviceId ID `json:"device_id"`
}
type GetDeviceAddressLeaseRuleResponseObject ¶
type GetDeviceAddressLeaseRuleResponseObject interface {
VisitGetDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
}
type GetDeviceAddresses200JSONResponse ¶
type GetDeviceAddresses200JSONResponse []Address
func (GetDeviceAddresses200JSONResponse) VisitGetDeviceAddressesResponse ¶
func (response GetDeviceAddresses200JSONResponse) VisitGetDeviceAddressesResponse(w http.ResponseWriter) error
type GetDeviceAddresses400JSONResponse ¶
type GetDeviceAddresses400JSONResponse ErrorResponse
func (GetDeviceAddresses400JSONResponse) VisitGetDeviceAddressesResponse ¶
func (response GetDeviceAddresses400JSONResponse) VisitGetDeviceAddressesResponse(w http.ResponseWriter) error
type GetDeviceAddresses404JSONResponse ¶
type GetDeviceAddresses404JSONResponse ErrorResponse
func (GetDeviceAddresses404JSONResponse) VisitGetDeviceAddressesResponse ¶
func (response GetDeviceAddresses404JSONResponse) VisitGetDeviceAddressesResponse(w http.ResponseWriter) error
type GetDeviceAddresses500JSONResponse ¶
type GetDeviceAddresses500JSONResponse ErrorResponse
func (GetDeviceAddresses500JSONResponse) VisitGetDeviceAddressesResponse ¶
func (response GetDeviceAddresses500JSONResponse) VisitGetDeviceAddressesResponse(w http.ResponseWriter) error
type GetDeviceAddressesRequestObject ¶
type GetDeviceAddressesRequestObject struct {
DeviceId ID `json:"device_id"`
}
type GetDeviceAddressesResponseObject ¶
type GetDeviceAddressesResponseObject interface {
VisitGetDeviceAddressesResponse(w http.ResponseWriter) error
}
type GetDeviceRequestObject ¶
type GetDeviceRequestObject struct {
DeviceId ID `json:"device_id"`
}
type GetDeviceResponseObject ¶
type GetDeviceResponseObject interface {
VisitGetDeviceResponse(w http.ResponseWriter) error
}
type GetDevices200JSONResponse ¶
type GetDevices200JSONResponse []Device
func (GetDevices200JSONResponse) VisitGetDevicesResponse ¶
func (response GetDevices200JSONResponse) VisitGetDevicesResponse(w http.ResponseWriter) error
type GetDevices500JSONResponse ¶
type GetDevices500JSONResponse ErrorResponse
func (GetDevices500JSONResponse) VisitGetDevicesResponse ¶
func (response GetDevices500JSONResponse) VisitGetDevicesResponse(w http.ResponseWriter) error
type GetDevicesRequestObject ¶
type GetDevicesRequestObject struct {
}
type GetDevicesResponseObject ¶
type GetDevicesResponseObject interface {
VisitGetDevicesResponse(w http.ResponseWriter) error
}
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListUsers200JSONResponse ¶
type ListUsers200JSONResponse []User
func (ListUsers200JSONResponse) VisitListUsersResponse ¶
func (response ListUsers200JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error
type ListUsers401JSONResponse ¶
type ListUsers401JSONResponse ErrorResponse
func (ListUsers401JSONResponse) VisitListUsersResponse ¶
func (response ListUsers401JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error
type ListUsers403Response ¶
type ListUsers403Response struct {
}
func (ListUsers403Response) VisitListUsersResponse ¶
func (response ListUsers403Response) VisitListUsersResponse(w http.ResponseWriter) error
type ListUsers500JSONResponse ¶
type ListUsers500JSONResponse ErrorResponse
func (ListUsers500JSONResponse) VisitListUsersResponse ¶
func (response ListUsers500JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error
type ListUsersRequestObject ¶
type ListUsersRequestObject struct {
}
type ListUsersResponseObject ¶
type ListUsersResponseObject interface {
VisitListUsersResponse(w http.ResponseWriter) error
}
type Login200JSONResponse ¶
type Login200JSONResponse struct {
Body User
Headers Login200ResponseHeaders
}
func (Login200JSONResponse) VisitLoginResponse ¶
func (response Login200JSONResponse) VisitLoginResponse(w http.ResponseWriter) error
type Login200ResponseHeaders ¶
type Login200ResponseHeaders struct {
SetCookie string
}
type Login401JSONResponse ¶
type Login401JSONResponse ErrorResponse
func (Login401JSONResponse) VisitLoginResponse ¶
func (response Login401JSONResponse) VisitLoginResponse(w http.ResponseWriter) error
type Login500JSONResponse ¶
type Login500JSONResponse ErrorResponse
func (Login500JSONResponse) VisitLoginResponse ¶
func (response Login500JSONResponse) VisitLoginResponse(w http.ResponseWriter) error
type LoginJSONRequestBody ¶
type LoginJSONRequestBody = AuthRequest
LoginJSONRequestBody defines body for Login for application/json ContentType.
type LoginRequestObject ¶
type LoginRequestObject struct {
Body *LoginJSONRequestBody
}
type LoginResponseObject ¶
type LoginResponseObject interface {
VisitLoginResponse(w http.ResponseWriter) error
}
type Logout204Response ¶
type Logout204Response struct {
Headers Logout204ResponseHeaders
}
func (Logout204Response) VisitLogoutResponse ¶
func (response Logout204Response) VisitLogoutResponse(w http.ResponseWriter) error
type Logout204ResponseHeaders ¶
type Logout204ResponseHeaders struct {
SetCookie string
}
type LogoutRequestObject ¶
type LogoutRequestObject struct {
}
type LogoutResponseObject ¶
type LogoutResponseObject interface {
VisitLogoutResponse(w http.ResponseWriter) error
}
type PromoteUser200JSONResponse ¶
type PromoteUser200JSONResponse User
func (PromoteUser200JSONResponse) VisitPromoteUserResponse ¶
func (response PromoteUser200JSONResponse) VisitPromoteUserResponse(w http.ResponseWriter) error
type PromoteUser401JSONResponse ¶
type PromoteUser401JSONResponse ErrorResponse
func (PromoteUser401JSONResponse) VisitPromoteUserResponse ¶
func (response PromoteUser401JSONResponse) VisitPromoteUserResponse(w http.ResponseWriter) error
type PromoteUser403JSONResponse ¶
type PromoteUser403JSONResponse ErrorResponse
func (PromoteUser403JSONResponse) VisitPromoteUserResponse ¶
func (response PromoteUser403JSONResponse) VisitPromoteUserResponse(w http.ResponseWriter) error
type PromoteUser404JSONResponse ¶
type PromoteUser404JSONResponse ErrorResponse
func (PromoteUser404JSONResponse) VisitPromoteUserResponse ¶
func (response PromoteUser404JSONResponse) VisitPromoteUserResponse(w http.ResponseWriter) error
type PromoteUser500JSONResponse ¶
type PromoteUser500JSONResponse ErrorResponse
func (PromoteUser500JSONResponse) VisitPromoteUserResponse ¶
func (response PromoteUser500JSONResponse) VisitPromoteUserResponse(w http.ResponseWriter) error
type PromoteUserRequestObject ¶
type PromoteUserRequestObject struct {
UserId ID `json:"user_id"`
}
type PromoteUserResponseObject ¶
type PromoteUserResponseObject interface {
VisitPromoteUserResponse(w http.ResponseWriter) error
}
type PutDeviceAddressLeaseRule200JSONResponse ¶
type PutDeviceAddressLeaseRule200JSONResponse DeviceAddressLeaseRule
func (PutDeviceAddressLeaseRule200JSONResponse) VisitPutDeviceAddressLeaseRuleResponse ¶
func (response PutDeviceAddressLeaseRule200JSONResponse) VisitPutDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type PutDeviceAddressLeaseRule400JSONResponse ¶
type PutDeviceAddressLeaseRule400JSONResponse ErrorResponse
func (PutDeviceAddressLeaseRule400JSONResponse) VisitPutDeviceAddressLeaseRuleResponse ¶
func (response PutDeviceAddressLeaseRule400JSONResponse) VisitPutDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type PutDeviceAddressLeaseRule404JSONResponse ¶
type PutDeviceAddressLeaseRule404JSONResponse ErrorResponse
func (PutDeviceAddressLeaseRule404JSONResponse) VisitPutDeviceAddressLeaseRuleResponse ¶
func (response PutDeviceAddressLeaseRule404JSONResponse) VisitPutDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type PutDeviceAddressLeaseRule500JSONResponse ¶
type PutDeviceAddressLeaseRule500JSONResponse ErrorResponse
func (PutDeviceAddressLeaseRule500JSONResponse) VisitPutDeviceAddressLeaseRuleResponse ¶
func (response PutDeviceAddressLeaseRule500JSONResponse) VisitPutDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
type PutDeviceAddressLeaseRuleJSONRequestBody ¶
type PutDeviceAddressLeaseRuleJSONRequestBody = PutDeviceAddressLeaseRuleRequest
PutDeviceAddressLeaseRuleJSONRequestBody defines body for PutDeviceAddressLeaseRule for application/json ContentType.
type PutDeviceAddressLeaseRuleRequest ¶
type PutDeviceAddressLeaseRuleRequest struct {
// TtlSeconds Seconds after which an enabled device address lease expires
TtlSeconds int `json:"ttl_seconds"`
}
PutDeviceAddressLeaseRuleRequest defines model for PutDeviceAddressLeaseRuleRequest.
type PutDeviceAddressLeaseRuleRequestObject ¶
type PutDeviceAddressLeaseRuleRequestObject struct {
DeviceId ID `json:"device_id"`
Body *PutDeviceAddressLeaseRuleJSONRequestBody
}
type PutDeviceAddressLeaseRuleResponseObject ¶
type PutDeviceAddressLeaseRuleResponseObject interface {
VisitPutDeviceAddressLeaseRuleResponse(w http.ResponseWriter) error
}
type RegenerateDeviceAPIKey200JSONResponse ¶
type RegenerateDeviceAPIKey200JSONResponse CreateDeviceResponse
func (RegenerateDeviceAPIKey200JSONResponse) VisitRegenerateDeviceAPIKeyResponse ¶
func (response RegenerateDeviceAPIKey200JSONResponse) VisitRegenerateDeviceAPIKeyResponse(w http.ResponseWriter) error
type RegenerateDeviceAPIKey404JSONResponse ¶
type RegenerateDeviceAPIKey404JSONResponse ErrorResponse
func (RegenerateDeviceAPIKey404JSONResponse) VisitRegenerateDeviceAPIKeyResponse ¶
func (response RegenerateDeviceAPIKey404JSONResponse) VisitRegenerateDeviceAPIKeyResponse(w http.ResponseWriter) error
type RegenerateDeviceAPIKey500JSONResponse ¶
type RegenerateDeviceAPIKey500JSONResponse ErrorResponse
func (RegenerateDeviceAPIKey500JSONResponse) VisitRegenerateDeviceAPIKeyResponse ¶
func (response RegenerateDeviceAPIKey500JSONResponse) VisitRegenerateDeviceAPIKeyResponse(w http.ResponseWriter) error
type RegenerateDeviceAPIKeyRequestObject ¶
type RegenerateDeviceAPIKeyRequestObject struct {
DeviceId ID `json:"device_id"`
}
type RegenerateDeviceAPIKeyResponseObject ¶
type RegenerateDeviceAPIKeyResponseObject interface {
VisitRegenerateDeviceAPIKeyResponse(w http.ResponseWriter) error
}
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface {
// List access log entries
// (GET /access-log)
GetAccessLog(w http.ResponseWriter, r *http.Request, params GetAccessLogParams)
// List valid deny reason values
// (GET /access-log/deny-reasons)
GetAccessLogDenyReasons(w http.ResponseWriter, r *http.Request)
// Request counts grouped by country
// (GET /access-log/stats/by-country)
GetAccessLogByCountry(w http.ResponseWriter, r *http.Request, params GetAccessLogByCountryParams)
// Get address activity history
// (GET /address-history)
GetAddressHistory(w http.ResponseWriter, r *http.Request, params GetAddressHistoryParams)
// List all users (Admin only)
// (GET /admin/users)
ListUsers(w http.ResponseWriter, r *http.Request)
// Register a new user (Admin only)
// (POST /admin/users)
CreateUser(w http.ResponseWriter, r *http.Request)
// Delete a user (Admin only)
// (DELETE /admin/users/{user_id})
DeleteUser(w http.ResponseWriter, r *http.Request, userId ID)
// Demote an admin to regular user (Admin only)
// (POST /admin/users/{user_id}/demote)
DemoteUser(w http.ResponseWriter, r *http.Request, userId ID)
// Promote a user to admin (Admin only)
// (POST /admin/users/{user_id}/promote)
PromoteUser(w http.ResponseWriter, r *http.Request, userId ID)
// Login user
// (POST /auth/login)
Login(w http.ResponseWriter, r *http.Request)
// Logout user
// (POST /auth/logout)
Logout(w http.ResponseWriter, r *http.Request)
// Get current user
// (GET /auth/me)
GetCurrentUser(w http.ResponseWriter, r *http.Request)
// Dashboard service breakdown
// (GET /dashboard/services)
GetDashboardServices(w http.ResponseWriter, r *http.Request, params GetDashboardServicesParams)
// Dashboard summary statistics
// (GET /dashboard/stats)
GetDashboardStats(w http.ResponseWriter, r *http.Request, params GetDashboardStatsParams)
// Dashboard top denied IPs
// (GET /dashboard/top-denied-ips)
GetDashboardTopDeniedIps(w http.ResponseWriter, r *http.Request, params GetDashboardTopDeniedIpsParams)
// Dashboard traffic time series
// (GET /dashboard/traffic)
GetDashboardTraffic(w http.ResponseWriter, r *http.Request, params GetDashboardTrafficParams)
// List all devices
// (GET /devices)
GetDevices(w http.ResponseWriter, r *http.Request)
// Create a device
// (POST /devices)
CreateDevice(w http.ResponseWriter, r *http.Request)
// Delete a device
// (DELETE /devices/{device_id})
DeleteDevice(w http.ResponseWriter, r *http.Request, deviceId ID)
// Get a device
// (GET /devices/{device_id})
GetDevice(w http.ResponseWriter, r *http.Request, deviceId ID)
// Get addresses for a device
// (GET /devices/{device_id}/addresses)
GetDeviceAddresses(w http.ResponseWriter, r *http.Request, deviceId ID)
// Assign address to device
// (POST /devices/{device_id}/addresses)
AddAddress(w http.ResponseWriter, r *http.Request, deviceId ID)
// Disable address
// (DELETE /devices/{device_id}/addresses/{address_id})
DisableAddress(w http.ResponseWriter, r *http.Request, deviceId ID, addressId ID)
// Regenerate device API key
// (POST /devices/{device_id}/api-key/regenerate)
RegenerateDeviceAPIKey(w http.ResponseWriter, r *http.Request, deviceId ID)
// Device heartbeat
// (POST /devices/{device_id}/heartbeat)
DeviceHeartbeat(w http.ResponseWriter, r *http.Request, deviceId ID)
// Disable device lease rule for a device
// (DELETE /devices/{device_id}/rules/address_lease)
DisableDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
// Get address lease rule for a device
// (GET /devices/{device_id}/rules/address_lease)
GetDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
// Create or update IP auto-expiry rule for a device
// (PUT /devices/{device_id}/rules/address_lease)
PutDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
// Performs a heartbeat with the given api key header
// (POST /heartbeat)
DeviceHeartbeatByAPIKey(w http.ResponseWriter, r *http.Request)
// Update current user profile
// (PATCH /users/me)
UpdateMe(w http.ResponseWriter, r *http.Request)
// Change current user password
// (POST /users/me/password)
ChangePassword(w http.ResponseWriter, r *http.Request)
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) AddAddress ¶
func (siw *ServerInterfaceWrapper) AddAddress(w http.ResponseWriter, r *http.Request)
AddAddress operation middleware
func (*ServerInterfaceWrapper) ChangePassword ¶
func (siw *ServerInterfaceWrapper) ChangePassword(w http.ResponseWriter, r *http.Request)
ChangePassword operation middleware
func (*ServerInterfaceWrapper) CreateDevice ¶
func (siw *ServerInterfaceWrapper) CreateDevice(w http.ResponseWriter, r *http.Request)
CreateDevice operation middleware
func (*ServerInterfaceWrapper) CreateUser ¶
func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser operation middleware
func (*ServerInterfaceWrapper) DeleteDevice ¶
func (siw *ServerInterfaceWrapper) DeleteDevice(w http.ResponseWriter, r *http.Request)
DeleteDevice operation middleware
func (*ServerInterfaceWrapper) DeleteUser ¶
func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser operation middleware
func (*ServerInterfaceWrapper) DemoteUser ¶
func (siw *ServerInterfaceWrapper) DemoteUser(w http.ResponseWriter, r *http.Request)
DemoteUser operation middleware
func (*ServerInterfaceWrapper) DeviceHeartbeat ¶
func (siw *ServerInterfaceWrapper) DeviceHeartbeat(w http.ResponseWriter, r *http.Request)
DeviceHeartbeat operation middleware
func (*ServerInterfaceWrapper) DeviceHeartbeatByAPIKey ¶
func (siw *ServerInterfaceWrapper) DeviceHeartbeatByAPIKey(w http.ResponseWriter, r *http.Request)
DeviceHeartbeatByAPIKey operation middleware
func (*ServerInterfaceWrapper) DisableAddress ¶
func (siw *ServerInterfaceWrapper) DisableAddress(w http.ResponseWriter, r *http.Request)
DisableAddress operation middleware
func (*ServerInterfaceWrapper) DisableDeviceAddressLeaseRule ¶
func (siw *ServerInterfaceWrapper) DisableDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request)
DisableDeviceAddressLeaseRule operation middleware
func (*ServerInterfaceWrapper) GetAccessLog ¶
func (siw *ServerInterfaceWrapper) GetAccessLog(w http.ResponseWriter, r *http.Request)
GetAccessLog operation middleware
func (*ServerInterfaceWrapper) GetAccessLogByCountry ¶
func (siw *ServerInterfaceWrapper) GetAccessLogByCountry(w http.ResponseWriter, r *http.Request)
GetAccessLogByCountry operation middleware
func (*ServerInterfaceWrapper) GetAccessLogDenyReasons ¶
func (siw *ServerInterfaceWrapper) GetAccessLogDenyReasons(w http.ResponseWriter, r *http.Request)
GetAccessLogDenyReasons operation middleware
func (*ServerInterfaceWrapper) GetAddressHistory ¶
func (siw *ServerInterfaceWrapper) GetAddressHistory(w http.ResponseWriter, r *http.Request)
GetAddressHistory operation middleware
func (*ServerInterfaceWrapper) GetCurrentUser ¶
func (siw *ServerInterfaceWrapper) GetCurrentUser(w http.ResponseWriter, r *http.Request)
GetCurrentUser operation middleware
func (*ServerInterfaceWrapper) GetDashboardServices ¶
func (siw *ServerInterfaceWrapper) GetDashboardServices(w http.ResponseWriter, r *http.Request)
GetDashboardServices operation middleware
func (*ServerInterfaceWrapper) GetDashboardStats ¶
func (siw *ServerInterfaceWrapper) GetDashboardStats(w http.ResponseWriter, r *http.Request)
GetDashboardStats operation middleware
func (*ServerInterfaceWrapper) GetDashboardTopDeniedIps ¶
func (siw *ServerInterfaceWrapper) GetDashboardTopDeniedIps(w http.ResponseWriter, r *http.Request)
GetDashboardTopDeniedIps operation middleware
func (*ServerInterfaceWrapper) GetDashboardTraffic ¶
func (siw *ServerInterfaceWrapper) GetDashboardTraffic(w http.ResponseWriter, r *http.Request)
GetDashboardTraffic operation middleware
func (*ServerInterfaceWrapper) GetDevice ¶
func (siw *ServerInterfaceWrapper) GetDevice(w http.ResponseWriter, r *http.Request)
GetDevice operation middleware
func (*ServerInterfaceWrapper) GetDeviceAddressLeaseRule ¶
func (siw *ServerInterfaceWrapper) GetDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request)
GetDeviceAddressLeaseRule operation middleware
func (*ServerInterfaceWrapper) GetDeviceAddresses ¶
func (siw *ServerInterfaceWrapper) GetDeviceAddresses(w http.ResponseWriter, r *http.Request)
GetDeviceAddresses operation middleware
func (*ServerInterfaceWrapper) GetDevices ¶
func (siw *ServerInterfaceWrapper) GetDevices(w http.ResponseWriter, r *http.Request)
GetDevices operation middleware
func (*ServerInterfaceWrapper) ListUsers ¶
func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)
ListUsers operation middleware
func (*ServerInterfaceWrapper) Login ¶
func (siw *ServerInterfaceWrapper) Login(w http.ResponseWriter, r *http.Request)
Login operation middleware
func (*ServerInterfaceWrapper) Logout ¶
func (siw *ServerInterfaceWrapper) Logout(w http.ResponseWriter, r *http.Request)
Logout operation middleware
func (*ServerInterfaceWrapper) PromoteUser ¶
func (siw *ServerInterfaceWrapper) PromoteUser(w http.ResponseWriter, r *http.Request)
PromoteUser operation middleware
func (*ServerInterfaceWrapper) PutDeviceAddressLeaseRule ¶
func (siw *ServerInterfaceWrapper) PutDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request)
PutDeviceAddressLeaseRule operation middleware
func (*ServerInterfaceWrapper) RegenerateDeviceAPIKey ¶
func (siw *ServerInterfaceWrapper) RegenerateDeviceAPIKey(w http.ResponseWriter, r *http.Request)
RegenerateDeviceAPIKey operation middleware
func (*ServerInterfaceWrapper) UpdateMe ¶
func (siw *ServerInterfaceWrapper) UpdateMe(w http.ResponseWriter, r *http.Request)
UpdateMe operation middleware
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// List access log entries
// (GET /access-log)
GetAccessLog(ctx context.Context, request GetAccessLogRequestObject) (GetAccessLogResponseObject, error)
// List valid deny reason values
// (GET /access-log/deny-reasons)
GetAccessLogDenyReasons(ctx context.Context, request GetAccessLogDenyReasonsRequestObject) (GetAccessLogDenyReasonsResponseObject, error)
// Request counts grouped by country
// (GET /access-log/stats/by-country)
GetAccessLogByCountry(ctx context.Context, request GetAccessLogByCountryRequestObject) (GetAccessLogByCountryResponseObject, error)
// Get address activity history
// (GET /address-history)
GetAddressHistory(ctx context.Context, request GetAddressHistoryRequestObject) (GetAddressHistoryResponseObject, error)
// List all users (Admin only)
// (GET /admin/users)
ListUsers(ctx context.Context, request ListUsersRequestObject) (ListUsersResponseObject, error)
// Register a new user (Admin only)
// (POST /admin/users)
CreateUser(ctx context.Context, request CreateUserRequestObject) (CreateUserResponseObject, error)
// Delete a user (Admin only)
// (DELETE /admin/users/{user_id})
DeleteUser(ctx context.Context, request DeleteUserRequestObject) (DeleteUserResponseObject, error)
// Demote an admin to regular user (Admin only)
// (POST /admin/users/{user_id}/demote)
DemoteUser(ctx context.Context, request DemoteUserRequestObject) (DemoteUserResponseObject, error)
// Promote a user to admin (Admin only)
// (POST /admin/users/{user_id}/promote)
PromoteUser(ctx context.Context, request PromoteUserRequestObject) (PromoteUserResponseObject, error)
// Login user
// (POST /auth/login)
Login(ctx context.Context, request LoginRequestObject) (LoginResponseObject, error)
// Logout user
// (POST /auth/logout)
Logout(ctx context.Context, request LogoutRequestObject) (LogoutResponseObject, error)
// Get current user
// (GET /auth/me)
GetCurrentUser(ctx context.Context, request GetCurrentUserRequestObject) (GetCurrentUserResponseObject, error)
// Dashboard service breakdown
// (GET /dashboard/services)
GetDashboardServices(ctx context.Context, request GetDashboardServicesRequestObject) (GetDashboardServicesResponseObject, error)
// Dashboard summary statistics
// (GET /dashboard/stats)
GetDashboardStats(ctx context.Context, request GetDashboardStatsRequestObject) (GetDashboardStatsResponseObject, error)
// Dashboard top denied IPs
// (GET /dashboard/top-denied-ips)
GetDashboardTopDeniedIps(ctx context.Context, request GetDashboardTopDeniedIpsRequestObject) (GetDashboardTopDeniedIpsResponseObject, error)
// Dashboard traffic time series
// (GET /dashboard/traffic)
GetDashboardTraffic(ctx context.Context, request GetDashboardTrafficRequestObject) (GetDashboardTrafficResponseObject, error)
// List all devices
// (GET /devices)
GetDevices(ctx context.Context, request GetDevicesRequestObject) (GetDevicesResponseObject, error)
// Create a device
// (POST /devices)
CreateDevice(ctx context.Context, request CreateDeviceRequestObject) (CreateDeviceResponseObject, error)
// Delete a device
// (DELETE /devices/{device_id})
DeleteDevice(ctx context.Context, request DeleteDeviceRequestObject) (DeleteDeviceResponseObject, error)
// Get a device
// (GET /devices/{device_id})
GetDevice(ctx context.Context, request GetDeviceRequestObject) (GetDeviceResponseObject, error)
// Get addresses for a device
// (GET /devices/{device_id}/addresses)
GetDeviceAddresses(ctx context.Context, request GetDeviceAddressesRequestObject) (GetDeviceAddressesResponseObject, error)
// Assign address to device
// (POST /devices/{device_id}/addresses)
AddAddress(ctx context.Context, request AddAddressRequestObject) (AddAddressResponseObject, error)
// Disable address
// (DELETE /devices/{device_id}/addresses/{address_id})
DisableAddress(ctx context.Context, request DisableAddressRequestObject) (DisableAddressResponseObject, error)
// Regenerate device API key
// (POST /devices/{device_id}/api-key/regenerate)
RegenerateDeviceAPIKey(ctx context.Context, request RegenerateDeviceAPIKeyRequestObject) (RegenerateDeviceAPIKeyResponseObject, error)
// Device heartbeat
// (POST /devices/{device_id}/heartbeat)
DeviceHeartbeat(ctx context.Context, request DeviceHeartbeatRequestObject) (DeviceHeartbeatResponseObject, error)
// Disable device lease rule for a device
// (DELETE /devices/{device_id}/rules/address_lease)
DisableDeviceAddressLeaseRule(ctx context.Context, request DisableDeviceAddressLeaseRuleRequestObject) (DisableDeviceAddressLeaseRuleResponseObject, error)
// Get address lease rule for a device
// (GET /devices/{device_id}/rules/address_lease)
GetDeviceAddressLeaseRule(ctx context.Context, request GetDeviceAddressLeaseRuleRequestObject) (GetDeviceAddressLeaseRuleResponseObject, error)
// Create or update IP auto-expiry rule for a device
// (PUT /devices/{device_id}/rules/address_lease)
PutDeviceAddressLeaseRule(ctx context.Context, request PutDeviceAddressLeaseRuleRequestObject) (PutDeviceAddressLeaseRuleResponseObject, error)
// Performs a heartbeat with the given api key header
// (POST /heartbeat)
DeviceHeartbeatByAPIKey(ctx context.Context, request DeviceHeartbeatByAPIKeyRequestObject) (DeviceHeartbeatByAPIKeyResponseObject, error)
// Update current user profile
// (PATCH /users/me)
UpdateMe(ctx context.Context, request UpdateMeRequestObject) (UpdateMeResponseObject, error)
// Change current user password
// (POST /users/me/password)
ChangePassword(ctx context.Context, request ChangePasswordRequestObject) (ChangePasswordResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UTCTime ¶
UTCTime wraps time.Time and always marshals to UTC RFC3339. It is used for all date-time fields in API response types so that UTC serialization is enforced at the type level — the compiler requires an explicit UTCTime(t) conversion in every handler, making it impossible to accidentally return a non-UTC timestamp.
func (UTCTime) MarshalJSON ¶
func (*UTCTime) UnmarshalJSON ¶
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) AddAddress ¶
func (_ Unimplemented) AddAddress(w http.ResponseWriter, r *http.Request, deviceId ID)
Assign address to device (POST /devices/{device_id}/addresses)
func (Unimplemented) ChangePassword ¶
func (_ Unimplemented) ChangePassword(w http.ResponseWriter, r *http.Request)
Change current user password (POST /users/me/password)
func (Unimplemented) CreateDevice ¶
func (_ Unimplemented) CreateDevice(w http.ResponseWriter, r *http.Request)
Create a device (POST /devices)
func (Unimplemented) CreateUser ¶
func (_ Unimplemented) CreateUser(w http.ResponseWriter, r *http.Request)
Register a new user (Admin only) (POST /admin/users)
func (Unimplemented) DeleteDevice ¶
func (_ Unimplemented) DeleteDevice(w http.ResponseWriter, r *http.Request, deviceId ID)
Delete a device (DELETE /devices/{device_id})
func (Unimplemented) DeleteUser ¶
func (_ Unimplemented) DeleteUser(w http.ResponseWriter, r *http.Request, userId ID)
Delete a user (Admin only) (DELETE /admin/users/{user_id})
func (Unimplemented) DemoteUser ¶
func (_ Unimplemented) DemoteUser(w http.ResponseWriter, r *http.Request, userId ID)
Demote an admin to regular user (Admin only) (POST /admin/users/{user_id}/demote)
func (Unimplemented) DeviceHeartbeat ¶
func (_ Unimplemented) DeviceHeartbeat(w http.ResponseWriter, r *http.Request, deviceId ID)
Device heartbeat (POST /devices/{device_id}/heartbeat)
func (Unimplemented) DeviceHeartbeatByAPIKey ¶
func (_ Unimplemented) DeviceHeartbeatByAPIKey(w http.ResponseWriter, r *http.Request)
Performs a heartbeat with the given api key header (POST /heartbeat)
func (Unimplemented) DisableAddress ¶
func (_ Unimplemented) DisableAddress(w http.ResponseWriter, r *http.Request, deviceId ID, addressId ID)
Disable address (DELETE /devices/{device_id}/addresses/{address_id})
func (Unimplemented) DisableDeviceAddressLeaseRule ¶
func (_ Unimplemented) DisableDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
Disable device lease rule for a device (DELETE /devices/{device_id}/rules/address_lease)
func (Unimplemented) GetAccessLog ¶
func (_ Unimplemented) GetAccessLog(w http.ResponseWriter, r *http.Request, params GetAccessLogParams)
List access log entries (GET /access-log)
func (Unimplemented) GetAccessLogByCountry ¶
func (_ Unimplemented) GetAccessLogByCountry(w http.ResponseWriter, r *http.Request, params GetAccessLogByCountryParams)
Request counts grouped by country (GET /access-log/stats/by-country)
func (Unimplemented) GetAccessLogDenyReasons ¶
func (_ Unimplemented) GetAccessLogDenyReasons(w http.ResponseWriter, r *http.Request)
List valid deny reason values (GET /access-log/deny-reasons)
func (Unimplemented) GetAddressHistory ¶
func (_ Unimplemented) GetAddressHistory(w http.ResponseWriter, r *http.Request, params GetAddressHistoryParams)
Get address activity history (GET /address-history)
func (Unimplemented) GetCurrentUser ¶
func (_ Unimplemented) GetCurrentUser(w http.ResponseWriter, r *http.Request)
Get current user (GET /auth/me)
func (Unimplemented) GetDashboardServices ¶
func (_ Unimplemented) GetDashboardServices(w http.ResponseWriter, r *http.Request, params GetDashboardServicesParams)
Dashboard service breakdown (GET /dashboard/services)
func (Unimplemented) GetDashboardStats ¶
func (_ Unimplemented) GetDashboardStats(w http.ResponseWriter, r *http.Request, params GetDashboardStatsParams)
Dashboard summary statistics (GET /dashboard/stats)
func (Unimplemented) GetDashboardTopDeniedIps ¶
func (_ Unimplemented) GetDashboardTopDeniedIps(w http.ResponseWriter, r *http.Request, params GetDashboardTopDeniedIpsParams)
Dashboard top denied IPs (GET /dashboard/top-denied-ips)
func (Unimplemented) GetDashboardTraffic ¶
func (_ Unimplemented) GetDashboardTraffic(w http.ResponseWriter, r *http.Request, params GetDashboardTrafficParams)
Dashboard traffic time series (GET /dashboard/traffic)
func (Unimplemented) GetDevice ¶
func (_ Unimplemented) GetDevice(w http.ResponseWriter, r *http.Request, deviceId ID)
Get a device (GET /devices/{device_id})
func (Unimplemented) GetDeviceAddressLeaseRule ¶
func (_ Unimplemented) GetDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
Get address lease rule for a device (GET /devices/{device_id}/rules/address_lease)
func (Unimplemented) GetDeviceAddresses ¶
func (_ Unimplemented) GetDeviceAddresses(w http.ResponseWriter, r *http.Request, deviceId ID)
Get addresses for a device (GET /devices/{device_id}/addresses)
func (Unimplemented) GetDevices ¶
func (_ Unimplemented) GetDevices(w http.ResponseWriter, r *http.Request)
List all devices (GET /devices)
func (Unimplemented) ListUsers ¶
func (_ Unimplemented) ListUsers(w http.ResponseWriter, r *http.Request)
List all users (Admin only) (GET /admin/users)
func (Unimplemented) Login ¶
func (_ Unimplemented) Login(w http.ResponseWriter, r *http.Request)
Login user (POST /auth/login)
func (Unimplemented) Logout ¶
func (_ Unimplemented) Logout(w http.ResponseWriter, r *http.Request)
Logout user (POST /auth/logout)
func (Unimplemented) PromoteUser ¶
func (_ Unimplemented) PromoteUser(w http.ResponseWriter, r *http.Request, userId ID)
Promote a user to admin (Admin only) (POST /admin/users/{user_id}/promote)
func (Unimplemented) PutDeviceAddressLeaseRule ¶
func (_ Unimplemented) PutDeviceAddressLeaseRule(w http.ResponseWriter, r *http.Request, deviceId ID)
Create or update IP auto-expiry rule for a device (PUT /devices/{device_id}/rules/address_lease)
func (Unimplemented) RegenerateDeviceAPIKey ¶
func (_ Unimplemented) RegenerateDeviceAPIKey(w http.ResponseWriter, r *http.Request, deviceId ID)
Regenerate device API key (POST /devices/{device_id}/api-key/regenerate)
func (Unimplemented) UpdateMe ¶
func (_ Unimplemented) UpdateMe(w http.ResponseWriter, r *http.Request)
Update current user profile (PATCH /users/me)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateMe200JSONResponse ¶
type UpdateMe200JSONResponse User
func (UpdateMe200JSONResponse) VisitUpdateMeResponse ¶
func (response UpdateMe200JSONResponse) VisitUpdateMeResponse(w http.ResponseWriter) error
type UpdateMe400JSONResponse ¶
type UpdateMe400JSONResponse ErrorResponse
func (UpdateMe400JSONResponse) VisitUpdateMeResponse ¶
func (response UpdateMe400JSONResponse) VisitUpdateMeResponse(w http.ResponseWriter) error
type UpdateMe401JSONResponse ¶
type UpdateMe401JSONResponse ErrorResponse
func (UpdateMe401JSONResponse) VisitUpdateMeResponse ¶
func (response UpdateMe401JSONResponse) VisitUpdateMeResponse(w http.ResponseWriter) error
type UpdateMe409JSONResponse ¶
type UpdateMe409JSONResponse ErrorResponse
func (UpdateMe409JSONResponse) VisitUpdateMeResponse ¶
func (response UpdateMe409JSONResponse) VisitUpdateMeResponse(w http.ResponseWriter) error
type UpdateMe500JSONResponse ¶
type UpdateMe500JSONResponse ErrorResponse
func (UpdateMe500JSONResponse) VisitUpdateMeResponse ¶
func (response UpdateMe500JSONResponse) VisitUpdateMeResponse(w http.ResponseWriter) error
type UpdateMeJSONRequestBody ¶
type UpdateMeJSONRequestBody = UpdateProfileRequest
UpdateMeJSONRequestBody defines body for UpdateMe for application/json ContentType.
type UpdateMeRequestObject ¶
type UpdateMeRequestObject struct {
Body *UpdateMeJSONRequestBody
}
type UpdateMeResponseObject ¶
type UpdateMeResponseObject interface {
VisitUpdateMeResponse(w http.ResponseWriter) error
}
type UpdateProfileRequest ¶
type UpdateProfileRequest struct {
// DisplayName User's public name. Unicode allowed.
DisplayName *DisplayName `json:"display_name,omitempty"`
Email *openapi_types.Email `json:"email,omitempty"`
Username *string `json:"username,omitempty"`
// contains filtered or unexported fields
}
UpdateProfileRequest defines model for UpdateProfileRequest.
func (UpdateProfileRequest) AsUpdateProfileRequest0 ¶
func (t UpdateProfileRequest) AsUpdateProfileRequest0() (UpdateProfileRequest0, error)
AsUpdateProfileRequest0 returns the union data inside the UpdateProfileRequest as a UpdateProfileRequest0
func (UpdateProfileRequest) AsUpdateProfileRequest1 ¶
func (t UpdateProfileRequest) AsUpdateProfileRequest1() (UpdateProfileRequest1, error)
AsUpdateProfileRequest1 returns the union data inside the UpdateProfileRequest as a UpdateProfileRequest1
func (UpdateProfileRequest) AsUpdateProfileRequest2 ¶
func (t UpdateProfileRequest) AsUpdateProfileRequest2() (UpdateProfileRequest2, error)
AsUpdateProfileRequest2 returns the union data inside the UpdateProfileRequest as a UpdateProfileRequest2
func (*UpdateProfileRequest) FromUpdateProfileRequest0 ¶
func (t *UpdateProfileRequest) FromUpdateProfileRequest0(v UpdateProfileRequest0) error
FromUpdateProfileRequest0 overwrites any union data inside the UpdateProfileRequest as the provided UpdateProfileRequest0
func (*UpdateProfileRequest) FromUpdateProfileRequest1 ¶
func (t *UpdateProfileRequest) FromUpdateProfileRequest1(v UpdateProfileRequest1) error
FromUpdateProfileRequest1 overwrites any union data inside the UpdateProfileRequest as the provided UpdateProfileRequest1
func (*UpdateProfileRequest) FromUpdateProfileRequest2 ¶
func (t *UpdateProfileRequest) FromUpdateProfileRequest2(v UpdateProfileRequest2) error
FromUpdateProfileRequest2 overwrites any union data inside the UpdateProfileRequest as the provided UpdateProfileRequest2
func (UpdateProfileRequest) MarshalJSON ¶
func (t UpdateProfileRequest) MarshalJSON() ([]byte, error)
func (*UpdateProfileRequest) MergeUpdateProfileRequest0 ¶
func (t *UpdateProfileRequest) MergeUpdateProfileRequest0(v UpdateProfileRequest0) error
MergeUpdateProfileRequest0 performs a merge with any union data inside the UpdateProfileRequest, using the provided UpdateProfileRequest0
func (*UpdateProfileRequest) MergeUpdateProfileRequest1 ¶
func (t *UpdateProfileRequest) MergeUpdateProfileRequest1(v UpdateProfileRequest1) error
MergeUpdateProfileRequest1 performs a merge with any union data inside the UpdateProfileRequest, using the provided UpdateProfileRequest1
func (*UpdateProfileRequest) MergeUpdateProfileRequest2 ¶
func (t *UpdateProfileRequest) MergeUpdateProfileRequest2(v UpdateProfileRequest2) error
MergeUpdateProfileRequest2 performs a merge with any union data inside the UpdateProfileRequest, using the provided UpdateProfileRequest2
func (*UpdateProfileRequest) UnmarshalJSON ¶
func (t *UpdateProfileRequest) UnmarshalJSON(b []byte) error
type UpdateProfileRequest0 ¶
type UpdateProfileRequest0 = interface{}
UpdateProfileRequest0 defines model for .
type UpdateProfileRequest1 ¶
type UpdateProfileRequest1 = interface{}
UpdateProfileRequest1 defines model for .
type UpdateProfileRequest2 ¶
type UpdateProfileRequest2 = interface{}
UpdateProfileRequest2 defines model for .
type User ¶
type User struct {
CreatedAt UTCTime `json:"created_at"`
// DisplayName User's public name. Unicode allowed.
DisplayName DisplayName `json:"display_name"`
Email openapi_types.Email `json:"email"`
Id ID `json:"id"`
// MustChangePassword When true, the user must change their password before using the app.
MustChangePassword *bool `json:"must_change_password,omitempty"`
// Role The user's role. Only "admin" users can access admin endpoints.
Role UserRole `json:"role"`
// Username Unique username. Lowercase alphanumeric, underscores, and hyphens only. Uppercase letters are not accepted.
Username Username `json:"username"`
}
User defines model for User.