helper

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGitlabIssue

func GenerateGitlabIssue(zones []SubnetResponse, pat, api, projectID, zone string, logger *zap.Logger, includeEmpty bool, inner *string, project *gitlab.Project, items []*gitlab.Issue, client *gitlab.Client, labelMapping []Label)

func Hosts

func Hosts(ipnet *net.IPNet, pseudo bool) ([]string, error)

func Subnets

func Subnets(zone string, newMask int) ([]*net.IPNet, error)

Types

type ByNet

type ByNet []SubnetResponse

func (ByNet) Len

func (a ByNet) Len() int

func (ByNet) Less

func (a ByNet) Less(i, j int) bool

func (ByNet) Swap

func (a ByNet) Swap(i, j int)

type Label

type Label struct {
	Subnet string `json:"subnet"`
	Label  string `json:"label"`
	Color  string `json:"color"`
}

type SubnetResponse

type SubnetResponse struct {
	Net     string
	Section string
	Empty   bool
}

type Writer

type Writer struct {
	Log *zap.Logger
	// contains filtered or unexported fields
}

func (*Writer) Close

func (w *Writer) Close() error

Close closes the writer, flushing any buffered data in the process.

Always call Close once you're done with the Writer to ensure that it flushes all data.

func (*Writer) Sync

func (w *Writer) Sync() error

Sync flushes buffered data to the logger as a new log entry even if it doesn't contain a newline.

func (*Writer) Write

func (w *Writer) Write(bs []byte) (n int, err error)

Jump to

Keyboard shortcuts

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