Documentation
¶
Index ¶
- func NewClientWithResponses(appConfig config.Config) (*gen.ClientWithResponses, error)
- type Client
- func (c *Client) DeleteTaskByID(ctx context.Context, messageID uint64) (*gen.DeleteTaskIDResponse, error)
- func (c *Client) GetNetworkDNSByInterface(ctx context.Context, interfaceName string) (*gen.GetNetworkDNSByInterfaceResponse, error)
- func (c *Client) GetSystemHostname(ctx context.Context) (*gen.GetSystemHostnameResponse, error)
- func (c *Client) GetSystemStatus(ctx context.Context) (*gen.GetSystemStatusResponse, error)
- func (c *Client) GetTaskByID(ctx context.Context, messageID uint64) (*gen.GetTaskIDResponse, error)
- func (c *Client) GetTaskList(ctx context.Context) (*gen.GetTaskResponse, error)
- func (c *Client) GetTaskStatus(ctx context.Context) (*gen.GetTaskStatusResponse, error)
- func (c *Client) PostNetworkPing(ctx context.Context, address string) (*gen.PostNetworkPingResponse, error)
- func (c *Client) PostTask(ctx context.Context, messageBody string) (*gen.PostTaskResponse, error)
- func (c *Client) PutNetworkDNS(ctx context.Context, servers []string, searchDomains []string, ...) (*gen.PutNetworkDNSResponse, error)
- type CombinedHandler
- type NetworkHandler
- type SystemHandler
- type TaskHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientWithResponses ¶
func NewClientWithResponses( appConfig config.Config, ) (*gen.ClientWithResponses, error)
NewClientWithResponses factory to create new instance. hate returning an error here... feels like a design flaw.
Types ¶
type Client ¶
type Client struct { // Client client for interacting with the API. Client *gen.ClientWithResponses // contains filtered or unexported fields }
Client implementation of Client operations.
func (*Client) DeleteTaskByID ¶
func (c *Client) DeleteTaskByID( ctx context.Context, messageID uint64, ) (*gen.DeleteTaskIDResponse, error)
DeleteTaskByID deletes a single item through the task API endpoint.
func (*Client) GetNetworkDNSByInterface ¶
func (c *Client) GetNetworkDNSByInterface( ctx context.Context, interfaceName string, ) (*gen.GetNetworkDNSByInterfaceResponse, error)
GetNetworkDNSByInterface get the network dns get API endpoint.
func (*Client) GetSystemHostname ¶
GetSystemHostname get the system hostname API endpoint.
func (*Client) GetSystemStatus ¶
GetSystemStatus get the system status API endpoint.
func (*Client) GetTaskByID ¶
func (c *Client) GetTaskByID( ctx context.Context, messageID uint64, ) (*gen.GetTaskIDResponse, error)
GetTaskByID fetches a single item through the task API endpoint.
func (*Client) GetTaskList ¶
GetTaskList get all items through the task API endpoint.
func (*Client) GetTaskStatus ¶
GetTaskStatus gets status through the task API endpoint.
func (*Client) PostNetworkPing ¶
func (c *Client) PostNetworkPing( ctx context.Context, address string, ) (*gen.PostNetworkPingResponse, error)
PostNetworkPing post the network ping API endpoint.
type CombinedHandler ¶
type CombinedHandler interface { NetworkHandler TaskHandler SystemHandler }
CombinedHandler is a superset of all smaller handler interfaces.
type NetworkHandler ¶
type NetworkHandler interface { // GetNetworkDNSByInterface get the network dns get API endpoint. GetNetworkDNSByInterface( ctx context.Context, _ string, ) (*gen.GetNetworkDNSByInterfaceResponse, error) // PutNetworkDNS put the network dns put API endpoint. PutNetworkDNS( ctx context.Context, servers []string, searchDomains []string, interfaceName string, ) (*gen.PutNetworkDNSResponse, error) // PostNetworkPing post the network ping API endpoint. PostNetworkPing( ctx context.Context, address string, ) (*gen.PostNetworkPingResponse, error) }
NetworkHandler defines an interface for interacting with Network client operations.
type SystemHandler ¶
type SystemHandler interface { // GetSystemStatus get the system status API endpoint. GetSystemStatus(ctx context.Context) (*gen.GetSystemStatusResponse, error) // GetSystemHostname get the system hostname API endpoint. GetSystemHostname(ctx context.Context) (*gen.GetSystemHostnameResponse, error) }
SystemHandler defines an interface for interacting with System client operations.
type TaskHandler ¶
type TaskHandler interface { // DeleteTaskByID deletes a single item through the task API endpoint. DeleteTaskByID( ctx context.Context, messageID uint64, ) (*gen.DeleteTaskIDResponse, error) // GetTaskID fetches a single item through the task API endpoint. GetTaskByID( ctx context.Context, messageID uint64, ) (*gen.GetTaskIDResponse, error) // GetTaskList get all items through the task API endpoint. GetTaskList( ctx context.Context, ) (*gen.GetTaskResponse, error) // PostTask inserts a single item into the task API endpoint. PostTask( ctx context.Context, messageBody string, ) (*gen.PostTaskResponse, error) // GetTaskStatus gets status through the task API endpoint. GetTaskStatus(ctx context.Context) (*gen.GetTaskStatusResponse, error) }
TaskHandler defines an interface for interacting with Task client operations.