mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-14 13:51:01 +02:00
policy/v2: add String func to AutoApprover interface
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
7887cc9958
commit
7aed2e8468
@ -160,6 +160,10 @@ func (g Group) CanBeAutoApprover() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g Group) String() string {
|
||||||
|
return string(g)
|
||||||
|
}
|
||||||
|
|
||||||
func (g Group) Resolve(p *Policy, users types.Users, nodes types.Nodes) (*netipx.IPSet, error) {
|
func (g Group) Resolve(p *Policy, users types.Users, nodes types.Nodes) (*netipx.IPSet, error) {
|
||||||
var ips netipx.IPSetBuilder
|
var ips netipx.IPSetBuilder
|
||||||
var errs []error
|
var errs []error
|
||||||
@ -233,6 +237,10 @@ func (t Tag) CanBeAutoApprover() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t Tag) String() string {
|
||||||
|
return string(t)
|
||||||
|
}
|
||||||
|
|
||||||
// Host is a string that represents a hostname.
|
// Host is a string that represents a hostname.
|
||||||
type Host string
|
type Host string
|
||||||
|
|
||||||
@ -591,6 +599,7 @@ func unmarshalPointer[T any](
|
|||||||
type AutoApprover interface {
|
type AutoApprover interface {
|
||||||
CanBeAutoApprover() bool
|
CanBeAutoApprover() bool
|
||||||
UnmarshalJSON([]byte) error
|
UnmarshalJSON([]byte) error
|
||||||
|
String() string
|
||||||
}
|
}
|
||||||
|
|
||||||
type AutoApprovers []AutoApprover
|
type AutoApprovers []AutoApprover
|
||||||
|
Loading…
Reference in New Issue
Block a user