Documentation ¶
Overview ¶
Package pas provides the client for making API requests to the Enlight Point Alarm Status Service.
Examples ¶
Out of Window Overall Alarm
40 <= x => DANGER 20 <= x < 40 => ALERT 2 < x < 20 => GOOD 1 < x <= 2 => ALERT x <= 1 => DANGER SetPointAlarmThresholdInput { node_id: "<node_id>", user_id: "<user_id>", type: OVERALL_OUT_OF_WINDOW, intervals: [ { left_bound: 40, type: LEFT_BOUNDED_RIGHT_UNBOUNDED_LEFT_CLOSED, status: DANGER }, { left_bound: 20, right_bound: 40, type: BOUNDED_LEFT_CLOSED_RIGHT_OPEN, status: ALERT }, { left_bound: 2, right_bound: 20, type: BOUNDED_OPEN, status: GOOD }, { left_bound: 1, right_bound: 2, type: BOUNDED_LEFT_OPEN_RIGHT_CLOSED, status: ALERT }, { right_bound: 1, type: LEFT_UNBOUNDED_RIGHT_BOUNDED_RIGHT_CLOSED, status: DANGER } ] }
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) DeepPing() (err error)
- func (c *Client) DeepPingWithContext(ctx context.Context) (err error)
- func (c *Client) Dial(host, port string, opts ...grpc.DialOption) (err error)
- func (c *Client) GetPointAlarmStatus(input pasapi.GetPointAlarmStatusInput) (pasapi.AlarmStatus, error)
- func (c *Client) GetPointAlarmStatusStream(dc chan<- pasapi.GetPointAlarmStatusStreamOutput) error
- func (c *Client) GetPointAlarmStatusStreamWithContext(ctx context.Context, dc chan<- pasapi.GetPointAlarmStatusStreamOutput) (err error)
- func (c *Client) GetPointAlarmStatusWithContext(ctx context.Context, input pasapi.GetPointAlarmStatusInput) (status pasapi.AlarmStatus, err error)
- func (c *Client) GetPointAlarmThreshold(nodeID string) (pasapi.GetPointAlarmThresholdOutput, error)
- func (c *Client) GetPointAlarmThresholdWithContext(ctx context.Context, nodeID string) (output pasapi.GetPointAlarmThresholdOutput, err error)
- func (c *Client) SetPointAlarmStatus(input pasapi.SetPointAlarmStatusInput) error
- func (c *Client) SetPointAlarmStatusWithContext(ctx context.Context, input pasapi.SetPointAlarmStatusInput) error
- func (c *Client) SetPointAlarmThreshold(input pasapi.SetPointAlarmThresholdInput) error
- func (c *Client) SetPointAlarmThresholdWithContext(ctx context.Context, input pasapi.SetPointAlarmThresholdInput) error
- type PointAlarmStatusClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the PointAlarmStatusClient and holds the connection.
func (*Client) Close ¶
func (c *Client) Close()
Close tears down the ClientConn and all underlying connections.
func (*Client) DeepPingWithContext ¶
DeepPingWithContext pings the service to see if it is alive.
func (*Client) Dial ¶
func (c *Client) Dial(host, port string, opts ...grpc.DialOption) (err error)
Dial creates a client connection to the given host.
func (*Client) GetPointAlarmStatus ¶
func (c *Client) GetPointAlarmStatus(input pasapi.GetPointAlarmStatusInput) (pasapi.AlarmStatus, error)
GetPointAlarmStatus gets the alarm status for a specific point
func (*Client) GetPointAlarmStatusStream ¶
func (c *Client) GetPointAlarmStatusStream(dc chan<- pasapi.GetPointAlarmStatusStreamOutput) error
GetPointAlarmStatusStream gets a stream of alarm status updates for all points
func (*Client) GetPointAlarmStatusStreamWithContext ¶
func (c *Client) GetPointAlarmStatusStreamWithContext(ctx context.Context, dc chan<- pasapi.GetPointAlarmStatusStreamOutput) (err error)
GetPointAlarmStatusStreamWithContext gets a stream of alarm status updates for all points
func (*Client) GetPointAlarmStatusWithContext ¶
func (c *Client) GetPointAlarmStatusWithContext(ctx context.Context, input pasapi.GetPointAlarmStatusInput) (status pasapi.AlarmStatus, err error)
GetPointAlarmStatusWithContext gets the alarm status for a specific point
func (*Client) GetPointAlarmThreshold ¶
func (c *Client) GetPointAlarmThreshold(nodeID string) (pasapi.GetPointAlarmThresholdOutput, error)
GetPointAlarmThreshold gets the alarm threshold for a specific point
func (*Client) GetPointAlarmThresholdWithContext ¶
func (c *Client) GetPointAlarmThresholdWithContext(ctx context.Context, nodeID string) (output pasapi.GetPointAlarmThresholdOutput, err error)
GetPointAlarmThresholdWithContext gets the alarm threshold for a specific point
func (*Client) SetPointAlarmStatus ¶
func (c *Client) SetPointAlarmStatus(input pasapi.SetPointAlarmStatusInput) error
SetPointAlarmStatus sets the alarm status for a specific point
func (*Client) SetPointAlarmStatusWithContext ¶
func (c *Client) SetPointAlarmStatusWithContext(ctx context.Context, input pasapi.SetPointAlarmStatusInput) error
SetPointAlarmStatusWithContext sets the alarm status for a specific point
func (*Client) SetPointAlarmThreshold ¶
func (c *Client) SetPointAlarmThreshold(input pasapi.SetPointAlarmThresholdInput) error
SetPointAlarmThreshold sets the alarm threshold for a specific point
func (*Client) SetPointAlarmThresholdWithContext ¶
func (c *Client) SetPointAlarmThresholdWithContext(ctx context.Context, input pasapi.SetPointAlarmThresholdInput) error
SetPointAlarmThresholdWithContext sets the alarm threshold for a specific point
type PointAlarmStatusClient ¶
type PointAlarmStatusClient interface { Dial(host, port string, opts ...grpc.DialOption) error Close() DeepPing() error DeepPingWithContext(ctx context.Context) error SetPointAlarmThreshold(input pasapi.SetPointAlarmThresholdInput) error SetPointAlarmThresholdWithContext(ctx context.Context, input pasapi.SetPointAlarmThresholdInput) error GetPointAlarmThreshold(nodeID string) (pasapi.GetPointAlarmThresholdOutput, error) GetPointAlarmThresholdWithContext(ctx context.Context, nodeID string) (pasapi.GetPointAlarmThresholdOutput, error) SetPointAlarmStatus(input pasapi.SetPointAlarmStatusInput) error SetPointAlarmStatusWithContext(ctx context.Context, input pasapi.SetPointAlarmStatusInput) error GetPointAlarmStatus(input pasapi.GetPointAlarmStatusInput) (pasapi.AlarmStatus, error) GetPointAlarmStatusWithContext(ctx context.Context, input pasapi.GetPointAlarmStatusInput) (pasapi.AlarmStatus, error) GetPointAlarmStatusStream(dc chan<- pasapi.GetPointAlarmStatusStreamOutput) error GetPointAlarmStatusStreamWithContext(ctx context.Context, dc chan<- pasapi.GetPointAlarmStatusStreamOutput) error }
PointAlarmStatusClient provides the API operation methods for making requests to the Enlight Point Alarm Status Service. See this package's package overview docs for details on the service.
func CreateClient ¶
func CreateClient() PointAlarmStatusClient
CreateClient creates an instance of the PointAlarmStatusClient