scalefile

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package scalefile implements the ScaleFile type, as well as any helper functions for interacting with ScaleFile types

Index

Constants

View Source
const (
	V1AlphaVersion = "v1alpha"
)

Variables

View Source
var (
	ErrInvalidName = errors.New("invalid name")
	ErrInvalidTag  = errors.New("invalid tag")
)

Functions

This section is empty.

Types

type ExtensionSchema added in v0.4.6

type ExtensionSchema struct {
	Organization string `hcl:"organization,attr"`
	Name         string `hcl:"name,attr"`
	Tag          string `hcl:"tag,attr"`
}

type Schema

type Schema struct {
	Version     string            `hcl:"version,attr"`
	Name        string            `hcl:"name,attr"`
	Tag         string            `hcl:"tag,attr"`
	Language    string            `hcl:"language,attr"`
	Signature   SignatureSchema   `hcl:"signature,block"`
	Stateless   bool              `hcl:"stateless,optional"`
	Function    string            `hcl:"function,attr"`
	Initialize  string            `hcl:"initialize,attr"`
	Description string            `hcl:"description,optional"`
	Extensions  []ExtensionSchema `hcl:"extension,block"`
}

func ReadSchema

func ReadSchema(path string) (*Schema, error)

func (*Schema) Decode

func (s *Schema) Decode(data []byte) error

func (*Schema) Encode

func (s *Schema) Encode() ([]byte, error)

func (*Schema) Validate

func (s *Schema) Validate() error

type SignatureSchema

type SignatureSchema struct {
	Organization string `hcl:"organization,attr"`
	Name         string `hcl:"name,attr"`
	Tag          string `hcl:"tag,attr"`
}

Jump to

Keyboard shortcuts

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