assetstubs

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewLocalAsset

func MustNewLocalAsset(t *testing.T, dir, f string) *assetmanager.LocalAsset

Types

type Asset

type Asset struct {
	IDReturn string

	TypeReturn  assets.Type
	MediaReturn string

	URLReturn string
	URLError  error

	AttributesReturn []html.Attribute

	ContentsReturn string
	ContentsError  error

	IsLocalReturn bool

	StringReturn string

	DebugReturn bool

	PathReturn string
}

func (*Asset) Attributes

func (a *Asset) Attributes() []html.Attribute

func (*Asset) Contents

func (a *Asset) Contents() (string, error)

func (*Asset) Debug

func (a *Asset) Debug(d string) bool

func (*Asset) ID

func (a *Asset) ID() string

func (*Asset) IsLocal

func (a *Asset) IsLocal() bool

func (*Asset) Media

func (a *Asset) Media() string

func (*Asset) Path

func (a *Asset) Path() string

func (*Asset) String

func (a *Asset) String() string

func (*Asset) Type

func (a *Asset) Type() assets.Type

func (*Asset) URL

func (a *Asset) URL() (string, error)

type Manager

type Manager struct {
	AllReturn []assetmanager.Asset

	WithIDReturn map[string](map[assets.Type][]assetmanager.Asset)

	WithTypeReturn map[assets.Type][]assetmanager.Asset
}

func (*Manager) AddLocal

func (m *Manager) AddLocal(a *assetmanager.LocalAsset)

func (*Manager) AddRemote

func (m *Manager) AddRemote(a *assetmanager.RemoteAsset)

func (*Manager) All

func (m *Manager) All() []assetmanager.Asset

func (*Manager) StaticDir

func (m *Manager) StaticDir() string

func (*Manager) String

func (m *Manager) String() string

func (*Manager) WithID

func (m *Manager) WithID(id string) map[assets.Type][]assetmanager.Asset

func (*Manager) WithType

func (m *Manager) WithType(t assets.Type) []assetmanager.Asset

Jump to

Keyboard shortcuts

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