model

package
v0.0.0-...-4899fa2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringExistsInArray

func StringExistsInArray(target string, arr []string) bool

StringExistsInArray checks if a string exists in an array of strings

Types

type DiffState

type DiffState struct {
	ReposToAdd             []FlatpakRepo
	ReposToRemove          []FlatpakRepo
	AppsToAdd              []FlatpakApplication
	AppsToRemove           []FlatpakApplication
	AppsToReplaceOverrides []FlatpakApplication
}

func GetDiffState

func GetDiffState(currentState, nextState State) DiffState

type FlatpakApplication

type FlatpakApplication struct {
	Name             string   `yaml:"name"`
	Repo             string   `yaml:"repo"`
	Branch           string   `yaml:"branch,omitempty"`
	All              []string `yaml:"all"`       // Default permissions
	Overrides        []string `yaml:"overrides"` // Override permissions
	InstallationType string   `yaml:"type"`
}

type FlatpakRepo

type FlatpakRepo struct {
	Name             string `yaml:"name"`
	URI              string `yaml:"uri"`
	InstallationType string `yaml:"type"`
}

type State

type State struct {
	Repos        []FlatpakRepo        `yaml:"repos"`
	Applications []FlatpakApplication `yaml:"applications"`
}

func GetComposeState

func GetComposeState(fileState, systemState State) State

func GetFileState

func GetFileState(stateFile string) (State, error)

func GetSystemState

func GetSystemState() State

Jump to

Keyboard shortcuts

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