loader

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TypeDirect = "direct"
View Source
const TypeHttp = "http"

Variables

This section is empty.

Functions

This section is empty.

Types

type Direct

type Direct struct {
	// contains filtered or unexported fields
}

func NewDirect

func NewDirect(dir, replace string, pattern *regexp.Regexp) *Direct

func NewDirectFromMap

func NewDirectFromMap(m map[string]interface{}) (*Direct, error)

func (Direct) Load

func (s Direct) Load(path string) ([]byte, error)

type Http

type Http struct {
	// contains filtered or unexported fields
}

func NewHttp

func NewHttp(host, scheme, replace string, pattern *regexp.Regexp) *Http

func NewHttpFromMap

func NewHttpFromMap(m map[string]interface{}) (*Http, error)

func (Http) Load

func (s Http) Load(path string) ([]byte, error)

type Loader

type Loader interface {
	Load(path string) ([]byte, error)
}

func New

func New(t string, m map[string]interface{}) (s Loader, err error)

func NewFromConfig

func NewFromConfig(c interface{}) (s Loader, err error)

Jump to

Keyboard shortcuts

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