mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-10 13:46:46 +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
|
||||
}
|
||||
|
||||
func (g Group) String() string {
|
||||
return string(g)
|
||||
}
|
||||
|
||||
func (g Group) Resolve(p *Policy, users types.Users, nodes types.Nodes) (*netipx.IPSet, error) {
|
||||
var ips netipx.IPSetBuilder
|
||||
var errs []error
|
||||
@ -233,6 +237,10 @@ func (t Tag) CanBeAutoApprover() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (t Tag) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// Host is a string that represents a hostname.
|
||||
type Host string
|
||||
|
||||
@ -591,6 +599,7 @@ func unmarshalPointer[T any](
|
||||
type AutoApprover interface {
|
||||
CanBeAutoApprover() bool
|
||||
UnmarshalJSON([]byte) error
|
||||
String() string
|
||||
}
|
||||
|
||||
type AutoApprovers []AutoApprover
|
||||
|
Loading…
Reference in New Issue
Block a user