Documentation ¶
Overview ¶
Package rackpluginhashes includes structs and functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginHashes ¶
type PluginHashes struct {
Hashes []Hash `yaml:"hashes"`
}
PluginHashes struct that will define the yaml structure of the pluginhashes.yaml
func MakeHashes ¶
func MakeHashes(pluginName, hashIn string) *PluginHashes
MakeHashes returns a PluginHashes object containing the given Values
func UnmarshalPluginHashes ¶
func UnmarshalPluginHashes(yamlPath string) (*PluginHashes, error)
UnmarshalPluginHashes unmarshals a pluginhashes.yaml file into a PluginHashes object
func (*PluginHashes) GetHash ¶
func (h *PluginHashes) GetHash(pluginName string) (string, error)
GetHash returns the hash of the latest commit of a given Plugin
func (*PluginHashes) MarshalPluginHashes ¶
func (h *PluginHashes) MarshalPluginHashes() (*[]byte, error)
MarshalPluginHashes marshals a PluginHashes object into a bytestream, for it to be stored as yaml
func (*PluginHashes) SetOrUpdateHash ¶
func (h *PluginHashes) SetOrUpdateHash(pluginName, hashIn string)
SetOrUpdateHash sets the Hash for a given Plugin. If the Plugin does not exist yet, it is created and added
Click to show internal directories.
Click to hide internal directories.