waveappstore

package
v0.12.3-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppNSLocal = "local"
	AppNSDraft = "draft"

	MaxNamespaceLen = 30
	MaxAppNameLen   = 50

	ManifestFileName       = "manifest.json"
	SecretBindingsFileName = "secret-bindings.json"
)

Variables

This section is empty.

Functions

func BuildAppSecretEnv

func BuildAppSecretEnv(appId string, manifest *wshrpc.AppManifest, bindings map[string]string) (map[string]string, error)

func DeleteApp

func DeleteApp(appId string) error

func DeleteAppFile

func DeleteAppFile(appId string, fileName string) error

func DraftHasLocalVersion

func DraftHasLocalVersion(draftAppId string) (bool, error)

func FormatGoFile

func FormatGoFile(appId string, fileName string) error

func GetAppDir

func GetAppDir(appId string) (string, error)

func GetAppModTime

func GetAppModTime(appId string) (int64, error)

func ListAllAppFiles

func ListAllAppFiles(appId string) (*fileutil.ReadDirResult, error)

func ListAllApps

func ListAllApps() ([]wshrpc.AppInfo, error)

func ListAllEditableApps

func ListAllEditableApps() ([]wshrpc.AppInfo, error)

func MakeAppId

func MakeAppId(appNS string, appName string) string

func MakeDraftFromLocal

func MakeDraftFromLocal(localAppId string) (string, error)

func ParseAppId

func ParseAppId(appId string) (appNS string, appName string, err error)

func PublishDraft

func PublishDraft(draftAppId string) (string, error)

func ReadAppManifest

func ReadAppManifest(appId string) (*wshrpc.AppManifest, error)

func ReadAppSecretBindings

func ReadAppSecretBindings(appId string) (map[string]string, error)

func RenameAppFile

func RenameAppFile(appId string, fromFileName string, toFileName string) error

func RenameLocalApp

func RenameLocalApp(appName string, newAppName string) error

RenameLocalApp renames a local app by renaming its directories in both the local and draft namespaces. It takes the current app name and the new app name (without namespace prefixes). Both local/[appName] and draft/[appName] will be renamed if they exist. Returns an error if the app doesn't exist in either namespace, if the new name is invalid, or if the new name conflicts with an existing app.

func ReplaceInAppFile

func ReplaceInAppFile(appId string, fileName string, edits []fileutil.EditSpec) error

func ReplaceInAppFilePartial

func ReplaceInAppFilePartial(appId string, fileName string, edits []fileutil.EditSpec) ([]fileutil.EditResult, error)

func RevertDraft

func RevertDraft(draftAppId string) error

func ValidateAppId

func ValidateAppId(appId string) error

func WriteAppFile

func WriteAppFile(appId string, fileName string, contents []byte) error

func WriteAppSecretBindings

func WriteAppSecretBindings(appId string, bindings map[string]string) error

Types

type FileData

type FileData struct {
	Contents []byte
	ModTs    int64
}

func ReadAppFile

func ReadAppFile(appId string, fileName string) (*FileData, error)

Jump to

Keyboard shortcuts

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