appfile

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package appfile reads and writes encore.app files.

Index

Constants

View Source
const Name = "encore.app"

Name is the name of the Encore app file. It is expected to be located in the root of the Encore app (which is usually the Git repository root).

Variables

This section is empty.

Functions

func Experiments added in v1.10.1

func Experiments(appRoot string) ([]experiments.Name, error)

Experiments returns the experimental feature the app located at appRoot has opted into.

func Slug

func Slug(appRoot string) (string, error)

Slug parses the app slug for the encore.app file located at path. The slug can be empty if the app is not linked to encore.dev.

Types

type File

type File struct {
	// ID is the encore.dev app id for the app.
	// It is empty if the app is not linked to encore.dev.
	ID string `json:"id"` // can be empty

	// Experiments is a list of values to enable experimental features in Encore.
	// These are not guaranteed to be stable in either runtime behaviour
	// or in API design.
	//
	// Do not use these features in production without consulting the Encore team.
	Experiments []experiments.Name `json:"experiments,omitempty"`
}

File is a parsed encore.app file.

func Parse

func Parse(data []byte) (*File, error)

Parse parses the app file data into a File.

func ParseFile

func ParseFile(path string) (*File, error)

ParseFile parses the app file located at path.

Jump to

Keyboard shortcuts

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