mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-10 13:46:46 +02:00
policy/v2: replace time.Duration with model.Duration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
563c6a5a5e
commit
d594a7d3ce
@ -6,12 +6,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
"github.com/juanfont/headscale/hscontrol/types"
|
"github.com/juanfont/headscale/hscontrol/types"
|
||||||
"github.com/juanfont/headscale/hscontrol/util"
|
"github.com/juanfont/headscale/hscontrol/util"
|
||||||
|
"github.com/prometheus/common/model"
|
||||||
"github.com/tailscale/hujson"
|
"github.com/tailscale/hujson"
|
||||||
"go4.org/netipx"
|
"go4.org/netipx"
|
||||||
"tailscale.com/net/tsaddr"
|
"tailscale.com/net/tsaddr"
|
||||||
@ -976,11 +976,11 @@ func (p *Policy) validate() error {
|
|||||||
|
|
||||||
// SSH controls who can ssh into which machines.
|
// SSH controls who can ssh into which machines.
|
||||||
type SSH struct {
|
type SSH struct {
|
||||||
Action string `json:"action"` // TODO(kradalby): add strict type
|
Action string `json:"action"`
|
||||||
Sources SSHSrcAliases `json:"src"`
|
Sources SSHSrcAliases `json:"src"`
|
||||||
Destinations SSHDstAliases `json:"dst"`
|
Destinations SSHDstAliases `json:"dst"`
|
||||||
Users []SSHUser `json:"users"`
|
Users []SSHUser `json:"users"`
|
||||||
CheckPeriod time.Duration `json:"checkPeriod,omitempty"`
|
CheckPeriod model.Duration `json:"checkPeriod,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSHSrcAliases is a list of aliases that can be used as sources in an SSH rule.
|
// SSHSrcAliases is a list of aliases that can be used as sources in an SSH rule.
|
||||||
|
Loading…
Reference in New Issue
Block a user