lwp

package
v0.0.0-...-e417875 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package lwp = lightweight policy

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	// ID of the policy
	ID int64 `json:"id"`
	// Algorithm applied to the rules
	// "OR" / "AND"
	Algorithm string `json:"algorithm"`

	// Rule collection
	Rules []*rule.Metadata `json:"rules"`
}

Metadata contains partial metadata of policy It's a lightweight version of policy.Metadata

func (*Metadata) FromJSON

func (m *Metadata) FromJSON(jsonData string) error

FromJSON constructs the metadata from json data

func (*Metadata) ToJSON

func (m *Metadata) ToJSON() (string, error)

ToJSON marshals metadata to JSON string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL