network

package
v0.0.0-...-e66d7cb Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateAndMarshalChangeDNSActionFunc = task.CreateAndMarshalChangeDNSAction

CreateAndMarshalChangeDNSActionFunc is a function variable that allows swapping the actual task.CreateAndMarshalChangeDNSAction function for a mock function during testing.

This is a temporary solution to facilitate testing by allowing the function to be replaced with a mock implementation. In the future, this may be replaced by a better solution using dependency injection or test mocks.

Functions

This section is empty.

Types

type Network

type Network struct {
	// Provider implements the methods to interact with various ping components.
	PingProvider ping.Provider
	// Provider implements the methods to interact with various dns components.
	DNSProvider dns.Provider
	// TaskClientManager responsible for managing task operations.
	TaskClientManager client.Manager
}

Network implementation of the System APIs operations.

func New

func New(
	pp ping.Provider,
	dnsp dns.Provider,
	cm client.Manager,
) *Network

New factory to create a new instance.

func (Network) GetNetworkDNSByInterface

func (n Network) GetNetworkDNSByInterface(
	ctx echo.Context,
	interfaceName string,
) error

GetNetworkDNSByInterface get the network dns get API endpoint.

func (Network) PostNetworkPing

func (n Network) PostNetworkPing(
	ctx echo.Context,
) error

PostNetworkPing post the network ping API endpoint.

func (Network) PutNetworkDNS

func (n Network) PutNetworkDNS(
	ctx echo.Context,
) error

PutNetworkDNS put the network dns API endpoint.

Directories

Path Synopsis
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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