model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

View Source
const (
	HeaderRequestID = "X-Request-ID"
	HeaderApiVer    = "X-Api-Version"
	HeaderSrvName   = "X-Service"
)
View Source
const (
	HostInfoPath      = "host-info"
	HostNetPath       = "network"
	HostOsPath        = "os"
	HostHwPath        = "hardware"
	HostResourcesPath = "host-resources"
	MDNSAdvPath       = "mdns-services"
	SrvInfoPath       = "info"
)

Variables

This section is empty.

Functions

func NewInternalError

func NewInternalError(err error) error

func NewInvalidInputError

func NewInvalidInputError(err error) error

func NewNotFoundError

func NewNotFoundError(err error) error

Types

type HostInfo

type HostInfo struct {
	OS       any     `json:"os"`
	Network  HostNet `json:"network"`
	Hardware any     `json:"hardware"`
}

type HostNet

type HostNet struct {
	Hostname   string         `json:"hostname"`
	Interfaces []NetInterface `json:"interfaces"`
}

type HostResource added in v0.1.3

type HostResource struct {
	ID   string       `json:"id"`
	Type ResourceType `json:"type"`
	HostResourceBase
}

type HostResourceBase added in v0.1.3

type HostResourceBase struct {
	Name string   `json:"name"`
	Tags []string `json:"tags"`
	Path string   `json:"path"`
}

type HostResourceFilter added in v0.1.3

type HostResourceFilter struct {
}

type InternalError

type InternalError struct {
	// contains filtered or unexported fields
}

func (*InternalError) Error

func (e *InternalError) Error() string

func (*InternalError) Unwrap

func (e *InternalError) Unwrap() error

type InvalidInputError

type InvalidInputError struct {
	// contains filtered or unexported fields
}

func (*InvalidInputError) Error

func (e *InvalidInputError) Error() string

func (*InvalidInputError) Unwrap

func (e *InvalidInputError) Unwrap() error

type NetInterface

type NetInterface struct {
	Name     string `json:"name"`
	IPv4Addr string `json:"ipv4_addr"`
	IPv4Mask string `json:"ipv4_mask"`
	IPv4Net  string `json:"ipv4_net"`
}

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type ResourceType

type ResourceType = string
const (
	SerialDevice ResourceType = "serial"
	Application  ResourceType = "app"
)

type Service added in v0.1.0

type Service struct {
	Type       string      `json:"type"`
	Subtypes   []string    `json:"subtypes"`
	DomainName string      `json:"domain_name"`
	HostName   string      `json:"host_name"`
	Port       uint        `json:"port"`
	IPVer      string      `json:"ip_ver"`
	TxtRecords []TxtRecord `json:"txt_records"`
}

type ServiceGroup added in v0.1.0

type ServiceGroup struct {
	ID               string    `json:"id"`
	Name             string    `json:"name"`
	ReplaceWildcards bool      `json:"replace_wildcards"`
	Services         []Service `json:"services"`
}

type ServiceGroupFilter added in v0.1.2

type ServiceGroupFilter struct {
}

type TxtRecord added in v0.1.0

type TxtRecord struct {
	Format string `json:"format"`
	Value  string `json:"value"`
}

Jump to

Keyboard shortcuts

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