rackpluginhashes

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: 3 Imported by: 0

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 Hash

type Hash struct {
	Name string `yaml:"name"`
	Hash string `yaml:"hash"`
}

Hash struct that defines the yaml structure of a single Plugin in the pluginhashes.yaml

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

Jump to

Keyboard shortcuts

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