rule

package
v0.0.0-...-b5b2af5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Config

type Config struct {
	WhiteList WhiteList `json:"white_list" toml:"white_list"`
	Rule      []Rule    `json:"rule" toml:"rule"`
	MIMEMap   map[string]bool
}

func SingletonConf

func SingletonConf() *Config

type Rule

type Rule struct {
	Id              int64  `json:"id" toml:"id"`
	Name            string `json:"name" toml:"name"`
	Description     string `json:"description" toml:"description"`
	FilePathPattern string `json:"file_path_pattern" toml:"file_path_pattern"`
	Level           string `json:"level" toml:"level"`
	MIME            string `json:"mime" toml:"mime"`
	MatchPattern    string `json:"match_pattern" toml:"match_pattern"`
	Env             string `json:"env" toml:"env"`
}

type WhiteList

type WhiteList struct {
	PathPattern []string `json:"path_pattern" toml:"path_pattern"`
}

Jump to

Keyboard shortcuts

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