config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config is responsible for parsing the SIG json config file into a set of simple intermediate data-structures.

Package config is responsible for parsing the SIG json config file into a set of simple intermediate data-structures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASEntry

type ASEntry struct {
	Nets []*IPNet
}

type Cfg

type Cfg struct {
	ASes          map[addr.IA]*ASEntry
	ConfigVersion uint64
}

Cfg is a direct Go representation of the JSON file format.

func LoadFromFile

func LoadFromFile(path string) (*Cfg, error)

Load a JSON config file from path and parse it into a Cfg struct.

type IPNet

type IPNet net.IPNet

IPNet is custom type of net.IPNet, to allow custom unmarshalling.

func (*IPNet) IPNet

func (in *IPNet) IPNet() *net.IPNet

func (*IPNet) MarshalJSON

func (in *IPNet) MarshalJSON() ([]byte, error)

func (*IPNet) String

func (in *IPNet) String() string

func (*IPNet) UnmarshalJSON

func (in *IPNet) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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