module

package
v3.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStoreInVault

func AddStoreInVault(storeIdentifier StoreIdentifier, store *Store) error

func DeleteModule

func DeleteModule(identifier StoreIdentifier) error

func EnableModuleInVault

func EnableModuleInVault(identifier StoreIdentifier) error

func InstallModule

func InstallModule(storeIdentifier StoreIdentifier) error

func MutateVault

func MutateVault(mutate func(*Vault) bool) error

func RemoveStoreInVault

func RemoveStoreInVault(identifier StoreIdentifier) error

func SetVault

func SetVault(vault *Vault) error

Types

type Artifact

type Artifact interface {
	GetMetdata() (Metadata, error)

	ToUrl() ArtifactURL
	// contains filtered or unexported methods
}

type ArtifactURL

type ArtifactURL string

func (ArtifactURL) Parse

func (u ArtifactURL) Parse() Artifact

type Author

type Author string

type LocalArtifact

type LocalArtifact string

func (LocalArtifact) GetMetdata

func (u LocalArtifact) GetMetdata() (Metadata, error)

func (LocalArtifact) ToUrl

func (u LocalArtifact) ToUrl() ArtifactURL

type LocalMetadataURL

type LocalMetadataURL string

type Metadata

type Metadata struct {
	Name        string   `json:"name"`
	Version     string   `json:"version"`
	Authors     []string `json:"authors"`
	Description string   `json:"description"`
	Tags        []string `json:"tags"`
	Entries     struct {
		Js  string `json:"js"`
		Css string `json:"css"`
	} `json:"entries"`
	HasMixins    bool              `json:"hasMixins"`
	Dependencies map[string]string `json:"dependencies"`
}

func (*Metadata) GetModuleIdentifier

func (m *Metadata) GetModuleIdentifier() ModuleIdentifier

TODO: avoid usage

func (*Metadata) GetStoreIdentifier

func (m *Metadata) GetStoreIdentifier() StoreIdentifier

TODO: avoid usage

type Module

type Module struct {
	Enabled Version           `json:"enabled"`
	V       map[Version]Store `json:"v"`
}

type ModuleIdentifier

type ModuleIdentifier string

type Name

type Name string

type ProviderURL

type ProviderURL string

type RemoteArtifact

type RemoteArtifact string

func (RemoteArtifact) GetMetdata

func (u RemoteArtifact) GetMetdata() (Metadata, error)

func (RemoteArtifact) ToUrl

func (u RemoteArtifact) ToUrl() ArtifactURL

type RemoteMetadataURL

type RemoteMetadataURL string

type Store

type Store struct {
	Installed bool          `json:"installed"`
	Artifacts []ArtifactURL `json:"artifacts"`
	Checksum  string        `json:"checksum"`
}

type StoreIdentifier

type StoreIdentifier struct {
	ModuleIdentifier
	Version
}

func NewStoreIdentifier

func NewStoreIdentifier(identifier string) StoreIdentifier

type Vault

type Vault struct {
	Modules map[ModuleIdentifier]Module `json:"modules"`
}

func GetVault

func GetVault() (*Vault, error)

type Version

type Version string

Jump to

Keyboard shortcuts

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