profile

package
v0.5.1-beta Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Manage raid profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(profile Profile) error

Adds a profile to the available profile list

func AddAll

func AddAll(profiles []Profile) error

Adds multiple profiles to the profile list

func Contains

func Contains(name string) bool

Checks if a profile exists

func CreateRepoConfigs

func CreateRepoConfigs(repos []RepoDraft)

CreateRepoConfigs writes a raid.yaml stub into each repository's local directory.

func Remove

func Remove(name string) error

Removes a profile from the profile list

func Set

func Set(name string) error

Sets the active profile

func Validate

func Validate(path string) error

Validates a profile file against the JSON schema

func WriteFile

func WriteFile(draft ProfileDraft, path string) error

WriteFile serializes draft to path as a YAML profile file.

Types

type Profile

type Profile = lib.Profile

func Get

func Get() Profile

Returns the active profile

func ListAll

func ListAll() []Profile

Returns a slice of all added profiles

func Unmarshal

func Unmarshal(path string) ([]Profile, error)

Extracts profiles from a file

type ProfileDraft

type ProfileDraft = lib.ProfileDraft

type RepoDraft

type RepoDraft = lib.RepoDraft

func CollectRepos

func CollectRepos(reader *bufio.Reader) []RepoDraft

CollectRepos runs an interactive prompt loop to collect repository details from reader.

Jump to

Keyboard shortcuts

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