static

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 6 Imported by: 6

Documentation

Overview

Package static is an implementation of AssetSource which loads assets from a static JSON file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticSource

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

StaticSource is an asset source which loads assets from a static JSON file

func LoadSource added in v0.26.0

func LoadSource(path string) (*StaticSource, error)

LoadSource loads a new static source from the given JSON file

func NewEmptySource added in v0.26.0

func NewEmptySource() *StaticSource

NewEmptySource creates a new empty source with no assets

func NewSource added in v0.26.0

func NewSource(data json.RawMessage) (*StaticSource, error)

NewSource creates a new static source from the given JSON

func (*StaticSource) Channels

func (s *StaticSource) Channels() ([]assets.Channel, error)

Channels returns all channel assets

func (*StaticSource) Fields

func (s *StaticSource) Fields() ([]assets.Field, error)

Fields returns all field assets

func (*StaticSource) Flow

func (s *StaticSource) Flow(uuid assets.FlowUUID) (assets.Flow, error)

Flow returns the flow asset with the given UUID

func (*StaticSource) Groups

func (s *StaticSource) Groups() ([]assets.Group, error)

Groups returns all group assets

func (*StaticSource) Labels

func (s *StaticSource) Labels() ([]assets.Label, error)

Labels returns all label assets

func (*StaticSource) Locations

func (s *StaticSource) Locations() ([]assets.LocationHierarchy, error)

Locations returns all location assets

func (*StaticSource) Resthooks

func (s *StaticSource) Resthooks() ([]assets.Resthook, error)

Resthooks returns all resthook assets

func (*StaticSource) Templates added in v0.32.0

func (s *StaticSource) Templates() ([]assets.Template, error)

Templates returns all template assets

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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