Documentation ¶
Index ¶
- type Comms
- func (c *Comms) BatchNodeRegistration(host *connect.Host, message *pb.SignedClientBatchKeyRequest) (*pb.SignedBatchKeyResponse, error)
- func (c *Comms) GetGatewayTLSCertificate(host *connect.Host, message *pb.RequestGatewayCert) (*pb.GatewayCertificate, error)
- func (c *Comms) RegisterForNotifications(host *connect.Host, message *pb.NotificationRegisterRequest) (*messages.Ack, error)
- func (c *Comms) RegisterToken(host *connect.Host, message *pb.RegisterTokenRequest) (*messages.Ack, error)
- func (c *Comms) RegisterTrackedID(host *connect.Host, message *pb.RegisterTrackedIdRequest) (*messages.Ack, error)
- func (c *Comms) RequestBatchMessages(host *connect.Host, message *pb.GetMessagesBatch) (*pb.GetMessagesResponseBatch, error)
- func (c *Comms) RequestHistoricalRounds(host *connect.Host, message *pb.HistoricalRounds) (*pb.HistoricalRoundsResponse, error)
- func (c *Comms) RequestMessages(host *connect.Host, message *pb.GetMessages) (*pb.GetMessagesResponse, error)
- func (c *Comms) RequestNdf(host *connect.Host, message *pb.NDFHash) (*pb.NDF, error)
- func (c *Comms) RetrieveNdf(currentDef *ndf.NetworkDefinition) (*ndf.NetworkDefinition, error)
- func (c *Comms) SendChannelLeaseRequest(host *connect.Host, message *pb.ChannelLeaseRequest) (*pb.ChannelLeaseResponse, error)
- func (c *Comms) SendConfirmFact(host *connect.Host, message *pb.FactConfirmRequest) (*messages.Ack, error)
- func (c *Comms) SendPoll(host *connect.Host, message *pb.GatewayPoll) (*pb.GatewayPollResponse, time.Time, time.Duration, error)
- func (c *Comms) SendPutManyMessages(host *connect.Host, messages *pb.GatewaySlots, timeout time.Duration) (*pb.GatewaySlotResponse, error)
- func (c *Comms) SendPutMessage(host *connect.Host, message *pb.GatewaySlot, timeout time.Duration) (*pb.GatewaySlotResponse, error)
- func (c *Comms) SendRegisterFact(host *connect.Host, message *pb.FactRegisterRequest) (*pb.FactRegisterResponse, error)
- func (c *Comms) SendRegisterUser(host *connect.Host, message *pb.UDBUserRegistration) (*messages.Ack, error)
- func (c *Comms) SendRegistrationMessage(host *connect.Host, message *pb.ClientRegistration) (*pb.SignedClientRegistrationConfirmations, error)
- func (c *Comms) SendRemoveFact(host *connect.Host, message *pb.FactRemovalRequest) (*messages.Ack, error)
- func (c *Comms) SendRemoveUser(host *connect.Host, message *pb.FactRemovalRequest) (*messages.Ack, error)
- func (c *Comms) SendRequestClientKeyMessage(host *connect.Host, message *pb.SignedClientKeyRequest) (*pb.SignedKeyResponse, error)
- func (c *Comms) SendUsernameValidation(host *connect.Host, message *pb.UsernameValidationRequest) (*pb.UsernameValidation, error)
- func (c *Comms) UnregisterForNotifications(host *connect.Host, message *pb.NotificationUnregisterRequest) (*messages.Ack, error)
- func (c *Comms) UnregisterToken(host *connect.Host, message *pb.UnregisterTokenRequest) (*messages.Ack, error)
- func (c *Comms) UnregisterTrackedID(host *connect.Host, message *pb.UnregisterTrackedIdRequest) (*messages.Ack, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comms ¶
type Comms struct {
*connect.ProtoComms
}
Client object used to implement endpoints and top-level comms functionality
func NewClientComms ¶
Returns a Comms object with given attributes
func (*Comms) BatchNodeRegistration ¶
func (c *Comms) BatchNodeRegistration(host *connect.Host, message *pb.SignedClientBatchKeyRequest) (*pb.SignedBatchKeyResponse, error)
Client -> Gateway Send Function
func (*Comms) GetGatewayTLSCertificate ¶
func (c *Comms) GetGatewayTLSCertificate(host *connect.Host, message *pb.RequestGatewayCert) (*pb.GatewayCertificate, error)
GetGatewayTLSCertificate Client -> Gateway cert request
func (*Comms) RegisterForNotifications ¶
func (c *Comms) RegisterForNotifications(host *connect.Host, message *pb.NotificationRegisterRequest) (*messages.Ack, error)
Client -> NotificationBot
func (*Comms) RegisterToken ¶
func (c *Comms) RegisterToken(host *connect.Host, message *pb.RegisterTokenRequest) (*messages.Ack, error)
RegisterToken registers the given token. It evaluates that the TransmissionRsaRegistarSig is correct. The RSA->PEM relationship is one to many. It will succeed if the token is already registered.
func (*Comms) RegisterTrackedID ¶
func (c *Comms) RegisterTrackedID(host *connect.Host, message *pb.RegisterTrackedIdRequest) (*messages.Ack, error)
RegisterTrackedID registers the given ID to be tracked. The request is signed Returns an error if TransmissionRSA is not registered with a valid token. The actual ID is not revealed, instead an intermediary value is sent which cannot be revered to get the ID, but is repeatable. So it can be rainbow-tabled.
func (*Comms) RequestBatchMessages ¶
func (c *Comms) RequestBatchMessages(host *connect.Host, message *pb.GetMessagesBatch) (*pb.GetMessagesResponseBatch, error)
RequestMessages Client -> Gateway Send Function
func (*Comms) RequestHistoricalRounds ¶
func (c *Comms) RequestHistoricalRounds(host *connect.Host, message *pb.HistoricalRounds) (*pb.HistoricalRoundsResponse, error)
RequestHistoricalRounds Client -> Gateway Send Function
func (*Comms) RequestMessages ¶
func (c *Comms) RequestMessages(host *connect.Host, message *pb.GetMessages) (*pb.GetMessagesResponse, error)
RequestMessages Client -> Gateway Send Function
func (*Comms) RequestNdf ¶
RequestNdf is used to get an NDF from permissioning. It is only used by UDB when starting or by client in testing. Other than those two uses, this function should never be used as clients.
func (*Comms) RetrieveNdf ¶
func (c *Comms) RetrieveNdf(currentDef *ndf.NetworkDefinition) (*ndf.NetworkDefinition, error)
RetrieveNdf, attempts to connect to the permissioning server to retrieve the latest ndf for the notifications bot
func (*Comms) SendChannelLeaseRequest ¶
func (c *Comms) SendChannelLeaseRequest(host *connect.Host, message *pb.ChannelLeaseRequest) (*pb.ChannelLeaseResponse, error)
Client -> User Discovery channel authentication & lease request
func (*Comms) SendConfirmFact ¶
func (c *Comms) SendConfirmFact(host *connect.Host, message *pb.FactConfirmRequest) (*messages.Ack, error)
Client -> User Discovery Delete Fact Function
func (*Comms) SendPoll ¶
func (c *Comms) SendPoll(host *connect.Host, message *pb.GatewayPoll) (*pb.GatewayPollResponse, time.Time, time.Duration, error)
SendPoll Client -> Gateway Send Function Returns a time.Time of the local clock (not netTime) when the comm was sent and a time.Duration representing the roundTripTime of the comm
func (*Comms) SendPutManyMessages ¶
func (c *Comms) SendPutManyMessages(host *connect.Host, messages *pb.GatewaySlots, timeout time.Duration) ( *pb.GatewaySlotResponse, error)
SendPutManyMessages Client -> Gateway Send Function
func (*Comms) SendPutMessage ¶
func (c *Comms) SendPutMessage(host *connect.Host, message *pb.GatewaySlot, timeout time.Duration) (*pb.GatewaySlotResponse, error)
SendPutMessage Client -> Gateway Send Function
func (*Comms) SendRegisterFact ¶
func (c *Comms) SendRegisterFact(host *connect.Host, message *pb.FactRegisterRequest) (*pb.FactRegisterResponse, error)
Client -> User Discovery Register Fact Function
func (*Comms) SendRegisterUser ¶
func (c *Comms) SendRegisterUser(host *connect.Host, message *pb.UDBUserRegistration) (*messages.Ack, error)
Client -> User Discovery Register User Function
func (*Comms) SendRegistrationMessage ¶
func (c *Comms) SendRegistrationMessage(host *connect.Host, message *pb.ClientRegistration) (*pb.SignedClientRegistrationConfirmations, error)
Client -> Registration Send Function
func (*Comms) SendRemoveFact ¶
func (c *Comms) SendRemoveFact(host *connect.Host, message *pb.FactRemovalRequest) (*messages.Ack, error)
Client -> User Discovery Delete Fact Function
func (*Comms) SendRemoveUser ¶
func (c *Comms) SendRemoveUser(host *connect.Host, message *pb.FactRemovalRequest) (*messages.Ack, error)
Client -> User Discovery Delete Fact Function
func (*Comms) SendRequestClientKeyMessage ¶
func (c *Comms) SendRequestClientKeyMessage(host *connect.Host, message *pb.SignedClientKeyRequest) (*pb.SignedKeyResponse, error)
SendRequestClientKeyMessage Client -> Gateway Send Function
func (*Comms) SendUsernameValidation ¶
func (c *Comms) SendUsernameValidation(host *connect.Host, message *pb.UsernameValidationRequest) (*pb.UsernameValidation, error)
SendUsernameValidation is a client to User Discovery send function. This will send a mixmessages.UsernameValidationRequest to UD, which UD will validate and send back a mixmessages.UsernameValidation.
func (*Comms) UnregisterForNotifications ¶
func (c *Comms) UnregisterForNotifications(host *connect.Host, message *pb.NotificationUnregisterRequest) (*messages.Ack, error)
Client -> NotificationBot
func (*Comms) UnregisterToken ¶
func (c *Comms) UnregisterToken(host *connect.Host, message *pb.UnregisterTokenRequest) (*messages.Ack, error)
UnregisterToken unregisters the given token. The request is signed. Does not return an error if the token cannot be found
func (*Comms) UnregisterTrackedID ¶
func (c *Comms) UnregisterTrackedID(host *connect.Host, message *pb.UnregisterTrackedIdRequest) (*messages.Ack, error)
UnregisterTrackedID unregisters the given tracked ID. The request is signed. Does not return an error if the token cannot be found