create

package
v0.71.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package create contains functions for to create Resource objects. This will typically non-files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client contains methods to create Resource objects. tasks to Resource objects.

func New

func New(rs *resources.Spec) *Client

New creates a new Client with the given specification.

func (*Client) FromString

func (c *Client) FromString(targetPath, content string) (resource.Resource, error)

FromString creates a new Resource from a string with the given relative target path.

func (*Client) Get

func (c *Client) Get(filename string) (resource.Resource, error)

Get creates a new Resource by opening the given filename in the assets filesystem.

func (*Client) GetMatch added in v0.57.0

func (c *Client) GetMatch(pattern string) (resource.Resource, error)

GetMatch gets first resource matching the given pattern from the assets filesystem.

func (*Client) Match added in v0.57.0

func (c *Client) Match(pattern string) (resource.Resources, error)

Match gets the resources matching the given pattern from the assets filesystem.

Jump to

Keyboard shortcuts

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