Skip to content

AccessRule🔗

Definition🔗

type AccessRule struct {
    // The kind this rule applies to (dashboards, alert, etc)
    Kind string `json:"kind"`
    // READ, WRITE, CREATE, DELETE, ...
    // should move to k8s style verbs like: "get", "list", "watch", "create", "update", "patch", "delete"
    Verb string `json:"verb"`
    // Specific sub-elements like "alert.rules" or "dashboard.permissions"????
    Target *string `json:"target,omitempty"`
}

Methods🔗

UnmarshalJSONStrict🔗

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode AccessRule from JSON.

Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (accessRule *AccessRule) UnmarshalJSONStrict(raw []byte) error

Equals🔗

Equals tests the equality of two AccessRule objects.

func (accessRule *AccessRule) Equals(other AccessRule) bool

Validate🔗

Validate checks all the validation constraints that may be defined on AccessRule fields for violations and returns them.

func (accessRule *AccessRule) Validate() error

See also🔗