config

package
v0.0.0-...-e14c116 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

* Qas is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.

* Qas is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.

* You should have received a copy of the GNU General Public License * along with Qas. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

HomeFolder that all projects repositories will be stored at

Functions

func All

func All() []domain.Config

return all configurations or none.

func AllToJson

func AllToJson() ([]byte, error)

Bundle configurations as a JSON array

func Append

func Append(project domain.Projects) domain.Projects

func CheckConfigSyntax

func CheckConfigSyntax() error

func ConfigCheckDuplicates

func ConfigCheckDuplicates()

TODO: Check for duplicates in configuration files

func Delete

func Delete(lang string) error

func Files

func Files() []fs.FileInfo

return all files found

func New

func New(payload io.ReadCloser) ([]byte, error)

func One

func One(lang string) ([]byte, error)

func ParseConfig

func ParseConfig(filepath string, filename string) (domain.Config, error)

Parse single configuration file, returns either properly parsed config parsed or empty struct.

TODO: check if the expect syntax is correct TODO: or err.

func RemoveConfig

func RemoveConfig(lang string) error

Types

type Structure

type Structure []struct {
	Lang     string `json:"lang"`
	Projects []struct {
		Name   string `json:"name"`
		Branch string `json:"branch"`
		URL    string `json:"url"`
	} `json:"projects"`
}

Structure structure of Configuration files log config files found

func AllAPI

func AllAPI(verbose *bool) Structure

All configuration consumed from the qas API

Jump to

Keyboard shortcuts

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