stract

package
v0.0.0-...-e4caca2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseVar

func ParseVar(input string, key string) string

func PrettyStruct

func PrettyStruct(data interface{}) string

Types

type Context

type Context struct {
	Parent   *Context   `json:"-"`
	Children []*Context `json:"children"`
	Name     string     `json:"name"`
	VaryDict []VaryDict `json:"vary_dict"`
}

func OpenAndParse

func OpenAndParse(path string) (*Context, error)

func (*Context) Get

func (c *Context) Get(s string) (bool, []string)

func (*Context) GetChild

func (ctx *Context) GetChild(name string) (bool, *Context)

func (*Context) GetChildren

func (ctx *Context) GetChildren() []*Context

func (*Context) GetSingleValue

func (c *Context) GetSingleValue(s string) string

func (*Context) GetVaryDict

func (ctx *Context) GetVaryDict(name string) (bool, []string)

func (*Context) GetVaryDicts

func (ctx *Context) GetVaryDicts() []VaryDict

func (*Context) VaryDictContains

func (ctx *Context) VaryDictContains(name string, value string) (bool, string)

func (*Context) VaryDictEndsWith

func (ctx *Context) VaryDictEndsWith(name string, value string) (bool, string)

func (*Context) VaryDictHas

func (ctx *Context) VaryDictHas(name string, value string) bool

func (*Context) VaryDictMatch

func (ctx *Context) VaryDictMatch(name string, regex *regexp.Regexp) (bool, [][]string)

func (*Context) VaryDictStartsWith

func (ctx *Context) VaryDictStartsWith(name string, value string) (bool, string)

type Token

type Token struct {
	Value string
	Pos   int
}

type VaryDict

type VaryDict struct {
	Key    string
	Values []string
}

func (*VaryDict) VaryDictContains

func (vary *VaryDict) VaryDictContains(value string) (bool, string)

func (VaryDict) VaryDictEndsWith

func (vary VaryDict) VaryDictEndsWith(value string) (bool, string)

func (*VaryDict) VaryDictGetVar

func (vary *VaryDict) VaryDictGetVar(value string) string

func (*VaryDict) VaryDictHas

func (vary *VaryDict) VaryDictHas(value string) bool

func (*VaryDict) VaryDictMatch

func (vary *VaryDict) VaryDictMatch(regex *regexp.Regexp) (bool, [][]string)

func (*VaryDict) VaryDictStartsWith

func (vary *VaryDict) VaryDictStartsWith(value string) (bool, string)

Jump to

Keyboard shortcuts

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