newreleases

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

An abstraction for interfacing with the newreleases.io api client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExclusionFromCfg

func ExclusionFromCfg(exclusionCfg config.NewReleasesExclusion) newreleases.Exclusion

func ExclusionSliceFromCfg

func ExclusionSliceFromCfg(exclusions []config.NewReleasesExclusion) []newreleases.Exclusion

func ExclusionSliceToCfg

func ExclusionSliceToCfg(exclusions []newreleases.Exclusion) []config.NewReleasesExclusion

func ExclusionToCfg

func ExclusionToCfg(exclusion newreleases.Exclusion) config.NewReleasesExclusion

func ProjectSliceToCfg

func ProjectSliceToCfg(projects []newreleases.Project) []config.NewReleasesProject

func ProjectToCfg

func ProjectToCfg(project newreleases.Project) config.NewReleasesProject

func SliceFromMap

func SliceFromMap(projectMap map[string]config.NewReleasesProject) []config.NewReleasesProject

Types

type ApplyLocalConfigOptions

type ApplyLocalConfigOptions struct {
	Destructive bool // indicates whether remote projects not present in local configuration should be removed
}

type NewReleases

type NewReleases struct {
	// contains filtered or unexported fields
}

Abstraction over the newreleases go v1 api

func FromCfg

func FromCfg(cfg config.NewReleases) NewReleases

func (NewReleases) ApplyLocalConfig

func (nr NewReleases) ApplyLocalConfig(options ApplyLocalConfigOptions) error

func (NewReleases) Diff

func (nr NewReleases) Diff() (*ProjectDiff, error)

type ProjectDiff

type ProjectDiff struct {
	Identical       map[string]config.NewReleasesProject
	MissingOnLocal  map[string]config.NewReleasesProject
	MissingOnRemote map[string]config.NewReleasesProject
	Diverged        map[string]ProjectTuple
}

A diff over local and remote newreleases.io [ProjectCfg] configuration Contains hashmaps that have to be initialized. Create a new object with [NewProjectDiff]

func InitProjectDiff

func InitProjectDiff() ProjectDiff

Creates a ProjectDiff and initialized the contained maps

func (ProjectDiff) DescribeDiverged

func (diff ProjectDiff) DescribeDiverged() (string, error)

func (ProjectDiff) Summary

func (diff ProjectDiff) Summary() string

Creates a formatted summary of the results of the diff Skips identical elements

type ProjectTuple

type ProjectTuple struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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