network

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBInterface

type DBInterface interface {
	Get(id string) (Info, error)
	GetList() ([]Info, error)
	GetIDWithIP(IPv4 string) (string, error)
	Set(conf Info) error
	Update(conf Info) error
	Delete(id string) error
}

DBInterface interface

type Info added in v1.1.0

type Info struct {
	ID   string   `json:"id"`
	IPv4 []string `json:"IPv4"`
	RTT  float64  `json:"RTT"`
}

Info struct

type Query

type Query struct {
}

Query struct

func (Query) Delete

func (Query) Delete(id string) error

Delete deletes the network info for id

func (Query) Get

func (Query) Get(id string) (Info, error)

Get returns network info that matches the id

func (Query) GetIDWithIP

func (q Query) GetIDWithIP(IP string) (string, error)

GetIDWithIP returns the ID that matches the IP

func (Query) GetList

func (Query) GetList() ([]Info, error)

GetList returns the list of network info

func (Query) Set

func (Query) Set(info Info) error

Set sets the network info for id

func (Query) Update

func (Query) Update(info Info) error

Update updates the network info for id

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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