Documentation ¶
Index ¶
- Constants
- func Read(rd io.Reader, dec Decoder) error
- func ReadBytes(data []byte, dec Decoder) error
- func ReadFile(path string, dec Decoder) error
- func ReadFormats(path string) (map[string][]string, error)
- func ReadModels(path string) (map[string]string, error)
- func Write(writer io.Writer, enc Encoder) error
- func WriteBytes(enc Encoder) ([]byte, error)
- type Alias
- type Aliases
- type Caster
- type Decoder
- type Encoder
- type Format
- type Formats
- type Model
- type Models
- type Mount
- type Mounts
- type User
- type Users
Constants ¶
const ( AliasesFile = "aliases.csv" FormatsFile = "formats.csv" ModelsFile = "models.csv" MountsFile = "mounts.csv" UsersFile = "users.csv" )
Variables ¶
This section is empty.
Functions ¶
func ReadBytes ¶
ReadFile reads csv input from a byte listand decodes elements into a given decoder interface.
func ReadFile ¶
ReadFile reads csv input from a file and decodes elements into a given decoder interface.
func ReadModels ¶
ReadModels extracts a map of GNNS receiver models from a csv file.
func WriteBytes ¶
WriteBytes encodes a given encoder interface into a byte slice.
Types ¶
type Aliases ¶
type Aliases []Alias
Mounts represents a list of ntripcaster alias mount information.
func (*Aliases) Decode ¶
Decode extracts a set of alias mount information from rows as expected from csv mount entries.
func (Aliases) Encode ¶
Encode builds a set of string slices representing the csv alias mount entries.
type Caster ¶
type Caster struct {
// contains filtered or unexported fields
}
Caster holds the decoded config data.
type Format ¶
Format represents the RTCM message types with update periods in parenthesis in seconds.
type Models ¶
type Models []Model
Models represents a set of GNSS receiver model aliases.
func (*Models) Decode ¶
Decode extracts model alias information from string slices as expected from csv files.
type Mount ¶
type Mount struct { Mount string Mark string Country string Format string Details string Groups []string User string Address string }
Mount represents an ntripcaster mount point.
func ReadMounts ¶
type Mounts ¶
type Mounts []Mount
Mounts represents a list of ntripcaster mount information.
func (*Mounts) Decode ¶
Decode extracts a set of mount information from rows as expected from csv mount entries.
type Users ¶
type Users []User
Users represents a list of account users.
func (*Users) Decode ¶
Decode is a function to extract information from a list of string slices, as expected for the entries in a csv file.