-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
21 lines (19 loc) · 1.38 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package idefixgo
import (
"github.com/spf13/viper"
)
// ClientOptions defines the configuration options for initializing a Client.
//
// These options include connection details, security settings, metadata, and other parameters
// that influence how the Client interacts with the MQTT broker
type ClientOptions struct {
Broker string `json:"broker"` // The address or URL of the MQTT broker the client will connect to.
Encoding string `json:"encoding"` // Specifies the data encoding format to be used.
CACert []byte `json:"cacert,omitempty"` // A byte slice containing the Certificate Authority (CA) certificate for secure communication.
Address string `json:"address"` // The specific client address or identifier used for communications.
Token string `json:"token"` // A security token for authenticating the client to the broker.
Meta map[string]interface{} `json:"meta,omitempty"` // A map containing additional metadata.
SessionID string `json:"session,omitempty"` // A string representing the session ID for the client's connection, useful for session management.
Groups []string `json:"groups,omitempty"` // A list of group identifiers to which the client belongs, used for access control.
vp *viper.Viper
}