mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-21 01:36:46 +00:00
Add SetupKey auto-groups property (#460)
This commit is contained in:
@@ -134,6 +134,15 @@ components:
|
||||
state:
|
||||
description: Setup key status, "valid", "overused","expired" or "revoked"
|
||||
type: string
|
||||
auto_groups:
|
||||
description: Setup key groups to auto-assign to peers registered with this key
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
updated_at:
|
||||
description: Setup key last update date
|
||||
type: string
|
||||
format: date-time
|
||||
required:
|
||||
- id
|
||||
- key
|
||||
@@ -145,6 +154,8 @@ components:
|
||||
- used_times
|
||||
- last_used
|
||||
- state
|
||||
- auto_groups
|
||||
- updated_at
|
||||
SetupKeyRequest:
|
||||
type: object
|
||||
properties:
|
||||
@@ -160,11 +171,17 @@ components:
|
||||
revoked:
|
||||
description: Setup key revocation status
|
||||
type: boolean
|
||||
auto_groups:
|
||||
description: Setup key groups to auto-assign to peers registered with this key
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
- expires_in
|
||||
- revoked
|
||||
- auto_groups
|
||||
GroupMinimum:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -299,6 +299,9 @@ type RulePatchOperationPath string
|
||||
|
||||
// SetupKey defines model for SetupKey.
|
||||
type SetupKey struct {
|
||||
// Setup key groups to auto-assign to peers registered with this key
|
||||
AutoGroups []string `json:"auto_groups"`
|
||||
|
||||
// Setup Key expiration date
|
||||
Expires time.Time `json:"expires"`
|
||||
|
||||
@@ -323,6 +326,9 @@ type SetupKey struct {
|
||||
// Setup key type, one-off for single time usage and reusable
|
||||
Type string `json:"type"`
|
||||
|
||||
// Setup key last update date
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
// Usage count of setup key
|
||||
UsedTimes int `json:"used_times"`
|
||||
|
||||
@@ -332,6 +338,9 @@ type SetupKey struct {
|
||||
|
||||
// SetupKeyRequest defines model for SetupKeyRequest.
|
||||
type SetupKeyRequest struct {
|
||||
// Setup key groups to auto-assign to peers registered with this key
|
||||
AutoGroups []string `json:"auto_groups"`
|
||||
|
||||
// Expiration time in seconds
|
||||
ExpiresIn int `json:"expires_in"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user