rackshopstore

package
v0.0.0-...-648df55 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package rackshopstore includes structs and operations to setup and manage shops for rackjobber to work on

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddShop

func AddShop(name string, address string, user string, password string, sdir string, container string) error

AddShop will add a shop to rackjobber based on the passed flags

func AddShopWithFile

func AddShopWithFile(path string) error

AddShopWithFile will add a shop based on a file where the informations are available

func GetShopFromStore

func GetShopFromStore(name string) (*rackshop.RackShop, error)

GetShopFromStore will return a shop config from the store.

func ListShopsFromStore

func ListShopsFromStore() (*[]rackshop.RackShop, error)

ListShopsFromStore returns all shops that are currently configured in the shop store

func RemoveShopFromStore

func RemoveShopFromStore(name string) error

RemoveShopFromStore will remove a shop with a given name from the shop store

Types

type ShopStore

type ShopStore struct {
	Shops []rackshop.RackShop
}

ShopStore struct that defines the structure for the shopStore.yaml

func UnmarshalShopStore

func UnmarshalShopStore(yamlPath string) (*ShopStore, error)

UnmarshalShopStore will unmarshal a yaml file at a specified path. Returns a ShopStore struct if the operation was successful

func (ShopStore) GetShopForName

func (s ShopStore) GetShopForName(name string) (*rackshop.RackShop, error)

GetShopForName will return the shop configuration for a specific name

func (ShopStore) MarshalShopStore

func (s ShopStore) MarshalShopStore() (*[]byte, error)

MarshalShopStore will marshal the current ShopStore object and return yaml data if the operation was successful

Jump to

Keyboard shortcuts

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