mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-22 16:07:11 +08:00
9b4f9a4a50
* NM-240: update api swagger docs * NM-240: remove api doc for debug api * NM-240: generate swagger * NM-240: remove deprecated and unused apis, update jit models * NM-240: deprecate ununsed apis from api docs
28 lines
1.1 KiB
Go
28 lines
1.1 KiB
Go
package models
|
|
|
|
// JITOperationRequest - request body for JIT admin operations
|
|
type JITOperationRequest struct {
|
|
Action string `json:"action"` // enable, disable, request, approve, deny
|
|
RequestID string `json:"request_id,omitempty"`
|
|
GrantID string `json:"grant_id,omitempty"`
|
|
Reason string `json:"reason,omitempty"`
|
|
ExpiresAt int64 `json:"expires_at,omitempty"` // Unix epoch timestamp (seconds) for when access should expire
|
|
}
|
|
|
|
// JITAccessRequest - request body for user JIT access request
|
|
type JITAccessRequest struct {
|
|
NetworkID string `json:"network_id"` // Network identifier
|
|
Reason string `json:"reason"` // Reason for access request (required)
|
|
}
|
|
|
|
// UserJITNetworkStatus represents JIT status for a network from user's perspective
|
|
type UserJITNetworkStatus struct {
|
|
NetworkID string `json:"network_id"`
|
|
NetworkName string `json:"network_name,omitempty"`
|
|
JITEnabled bool `json:"jit_enabled"`
|
|
HasAccess bool `json:"has_access"`
|
|
Grant any `json:"grant,omitempty"` // schema.JITGrant
|
|
Request any `json:"request,omitempty"` // schema.JITRequest
|
|
PendingRequest bool `json:"pending_request"`
|
|
}
|