mirror of
https://github.com/juanfont/headscale.git
synced 2025-10-21 09:39:00 +00:00
feat: implements apis for managing headscale policy (#1792)
This commit is contained in:
20
hscontrol/types/policy.go
Normal file
20
hscontrol/types/policy.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrPolicyNotFound = errors.New("acl policy not found")
|
||||
ErrPolicyUpdateIsDisabled = errors.New("update is disabled for modes other than 'database'")
|
||||
)
|
||||
|
||||
// Policy represents a policy in the database.
|
||||
type Policy struct {
|
||||
gorm.Model
|
||||
|
||||
// Data contains the policy in HuJSON format.
|
||||
Data string
|
||||
}
|
Reference in New Issue
Block a user