files

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: MPL-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package files contains a component for validating local files.

Index

Constants

This section is empty.

Variables

View Source
var Options = []sdk.Option{
	sdk.WithComponents(&Builder{}, &Registry{}),
}

Options are the SDK options to use for instantiation for the Files plugin.

Functions

This section is empty.

Types

type Builder

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

Builder validates the files in a directory or in the filesystem

func (*Builder) Build

func (b *Builder) Build(
	ctx context.Context,
	ui terminal.UI,
	src *component.Source,
) (*Files, error)

Build

func (*Builder) BuildFunc

func (b *Builder) BuildFunc() interface{}

BuildFunc implements component.Builder

func (*Builder) Config

func (b *Builder) Config() (interface{}, error)

Config implements Configurable

func (*Builder) Documentation

func (b *Builder) Documentation() (*docs.Documentation, error)

type BuilderConfig

type BuilderConfig struct{}

BuilderConfig is the configuration structure for the builder.

type Config

type Config struct {
	// Path is the path that files are stored in
	Path string `hcl:"path,attr"`
}

Config is the configuration structure for the registry.

type Files

type Files struct {
	Path                 string   `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Files) Descriptor

func (*Files) Descriptor() ([]byte, []int)

func (*Files) GetPath

func (m *Files) GetPath() string

func (*Files) ProtoMessage

func (*Files) ProtoMessage()

func (*Files) Reset

func (m *Files) Reset()

func (*Files) String

func (m *Files) String() string

func (*Files) XXX_DiscardUnknown

func (m *Files) XXX_DiscardUnknown()

func (*Files) XXX_Marshal

func (m *Files) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Files) XXX_Merge

func (m *Files) XXX_Merge(src proto.Message)

func (*Files) XXX_Size

func (m *Files) XXX_Size() int

func (*Files) XXX_Unmarshal

func (m *Files) XXX_Unmarshal(b []byte) error

type Registry

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

Registry represents access to a Files registry.

func (*Registry) Config

func (r *Registry) Config() (interface{}, error)

Config implements Configurable

func (*Registry) Documentation

func (r *Registry) Documentation() (*docs.Documentation, error)

func (*Registry) Push

func (r *Registry) Push(
	ctx context.Context,
	files *Files,
	ui terminal.UI,
) (*Files, error)

Push pushes an image to the registry.

func (*Registry) PushFunc

func (r *Registry) PushFunc() interface{}

PushFunc implements component.Registry

Jump to

Keyboard shortcuts

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