Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
ID primitive.ObjectID `bson:"_id, omitempty"json:"id"` // id
Name string `bson:"name"json:"name"form:"name"` // name of the agentprobe
Site primitive.ObjectID `bson:"site"json:"site"` // _id of mongo object
Pin string `bson:"pin"json:"pin"` // used for registration & authentication
Initialized bool `bson:"initialized"json:"initialized"` // will this be used or will we use the sessions/jwt tokens?
Location string `bson:"location"json:"location"` // logical/physical location
CreatedAt time.Time `bson:"createdAt"json:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt"json:"updatedAt"`
}
type DataToBeSent ¶
type DataToBeSent struct {
Data []byte
}
type EventTypeWS ¶
type EventTypeWS string
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
RestClient object
func (RestClient) Request ¶
func (c RestClient) Request(method, endpoint string, data, response interface{}) error
Request executes any HubSpot API method using the current client configuration
type RestClientConfig ¶
type RestClientConfig struct {
APIHost string
APIUsername string
APIPassword string
HTTPTimeout time.Duration
DialTimeout time.Duration
TLSTimeout time.Duration
}
RestClientConfig object used for client creation
func NewClientConfig ¶
func NewClientConfig() RestClientConfig
NewClientConfig constructs a RestClientConfig object with the environment variables set as default
type WebSocketEvent ¶
type WebSocketHandler ¶
type WebSocketHandler struct {
Host string
Pin string
ID string
HostWS string
Events []*WebSocketEvent `json:"events"`
Namespaces *websocket.Namespaces
RestClientConfig RestClientConfig
ProbeGetCh chan []probes.Probe
// contains filtered or unexported fields
}
func (*WebSocketHandler) GetConnection ¶
func (wsH *WebSocketHandler) GetConnection() *websocket.NSConn
func (*WebSocketHandler) InitWS ¶
func (wsH *WebSocketHandler) InitWS() error
Click to show internal directories.
Click to hide internal directories.