client

package
v0.0.0-...-cfe5e5d Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressRequestFromArgs

func AddressRequestFromArgs(args []string) (*pb.AddressRequest, error)

func RunQuery

func RunQuery(conf *Config, query Queryable) (string, string, error)

func Usage

func Usage()

Types

type Address

type Address struct {
	Name string `json:"name"`
	Mac  string `json:"mac"`
	IP   string `json:"ip"`
}

type Config

type Config struct {
	CertFile string
	KeyFile  string
	Timeout  int
	Iface    string
	Port     int
}

func ParseArgs

func ParseArgs() (*Config, []string)

type QueryDelete

type QueryDelete struct {
	Name string
	// contains filtered or unexported fields
}

func (*QueryDelete) RunWith

func (*QueryDelete) SetupArgs

func (ql *QueryDelete) SetupArgs(args []string) error

func (*QueryDelete) String

func (ql *QueryDelete) String() string

type QueryLookup

type QueryLookup struct {
	Name string
	// contains filtered or unexported fields
}

func (*QueryLookup) RunWith

func (*QueryLookup) SetupArgs

func (ql *QueryLookup) SetupArgs(args []string) error

func (*QueryLookup) String

func (ql *QueryLookup) String() string

type QueryRequest

type QueryRequest struct {
	Name string
	// contains filtered or unexported fields
}

func (*QueryRequest) RunWith

func (*QueryRequest) SetupArgs

func (qr *QueryRequest) SetupArgs(args []string) error

func (*QueryRequest) String

func (qr *QueryRequest) String() string

type Queryable

type Queryable interface {
	String() string
	SetupArgs(args []string) error
	RunWith(ctx context.Context, c pb.DNSMasqManagerClient) (string, string, error)
}

func NewQuery

func NewQuery(args []string) (Queryable, error)

Jump to

Keyboard shortcuts

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