static

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 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 LoadStaticSource

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

LoadStaticSource loads a new static source from the given JSON file

func NewStaticSource

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

NewStaticSource 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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