model

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() map[int]*Entry

func Load

func Load(f string)

func Set

func Set(item *Entry)

func Unset

func Unset(item *Entry)

Types

type Entry

type Entry struct {
	Id          int         `json:"id"`
	Prefix      string      `json:"prefix"`
	Type        string      `json:"type"`
	TypeCustom  TypeCustom  `json:"type_custom"`
	TypeStatics TypeStatics `json:"type_statics"`
	TypeProxy   TypeProxy   `json:"type_proxy"`
}

func GetById

func GetById(id int) *Entry

func GetByPrefix

func GetByPrefix(prefix string) *Entry
type Header struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Headers

type Headers []Header

type TypeCustom

type TypeCustom struct {
	StatusCode      int     `json:"status_code"`
	ResponseHeaders Headers `json:"response_headers"`
	Body            string  `json:"body"`
}

type TypeProxy

type TypeProxy struct {
	Url             string  `json:"url"`
	ResponseHeaders Headers `json:"response_headers"`
	ProxyHeaders    Headers `json:"proxy_headers"`
}

type TypeStatics

type TypeStatics struct {
	ResponseHeaders Headers `json:"response_headers"`
	Directory       string  `json:"directory"`
}

Jump to

Keyboard shortcuts

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