Documentation ¶
Index ¶
- type PubSubClient
- func (c *PubSubClient) Authenticate(clientid string, clientsecret string, sfdcloginurl string) error
- func (c *PubSubClient) Close()
- func (c *PubSubClient) FetchUserInfo(sfdcloginurl string) error
- func (c *PubSubClient) GetSchema(schemaId string) (*proto.SchemaInfo, error)
- func (c *PubSubClient) GetTopic(topicName string) (*proto.TopicInfo, error)
- func (c *PubSubClient) Subscribe(replayPreset proto.ReplayPreset, replayId []byte, channel chan []byte, ...) ([]byte, error)
- type SFDCEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSubClient ¶
type PubSubClient struct { Debug bool // contains filtered or unexported fields }
func NewGRPCClient ¶
func NewGRPCClient(isDebug bool) (*PubSubClient, error)
Creates a new connection to the gRPC server and returns the wrapper struct
func (*PubSubClient) Authenticate ¶
func (c *PubSubClient) Authenticate(clientid string, clientsecret string, sfdcloginurl string) error
Makes a call to the OAuth server to fetch credentials. Credentials are stored as part of the PubSubClient object so that they can be referenced later in other methods
func (*PubSubClient) Close ¶
func (c *PubSubClient) Close()
Closes the underlying connection to the gRPC server
func (*PubSubClient) FetchUserInfo ¶
func (c *PubSubClient) FetchUserInfo(sfdcloginurl string) error
Makes a call to the OAuth server to fetch user info. User info is stored as part of the PubSubClient object so that it can be referenced later in other methods
func (*PubSubClient) GetSchema ¶
func (c *PubSubClient) GetSchema(schemaId string) (*proto.SchemaInfo, error)
Wrapper function around the GetSchema RPC. This will add the OAuth credentials and make a call to fetch data about a specific schema
func (*PubSubClient) GetTopic ¶
func (c *PubSubClient) GetTopic(topicName string) (*proto.TopicInfo, error)
Wrapper function around the GetTopic RPC. This will add the OAuth credentials and make a call to fetch data about a specific topic
func (*PubSubClient) Subscribe ¶
func (c *PubSubClient) Subscribe(replayPreset proto.ReplayPreset, replayId []byte, channel chan []byte, topicName string, eventType string) ([]byte, error)
Wrapper function around the Subscribe RPC. This will add the OAuth credentials and create a separate streaming client that will be used to fetch data from the topic. This method will continuously consume messages unless an error occurs; if an error does occur then this method will return the last successfully consumed ReplayId as well as the error message. If no messages were successfully consumed then this method will return the same ReplayId that it originally received as a parameter
type SFDCEvent ¶
type SFDCEvent struct { EventType string AcceptLanguage string ApiType string ApiVersion string Application string AuthMethodReference string AuthServiceId string Browser string CipherSuite string City string ClientVersion string Country string CountryIso string CreatedById string CreatedDate int64 CurrentIp string CurrentPlatform string CurrentScreen string CurrentUserAgent string CurrentWindow string DelegatedOrganizationId string DelegatedUsername string EvaluationTime float64 EventDate int64 EventIdentifier string EventUuid string EventSource string HasExternalUsers bool HttpMethod string ImpactedUserIds string LoginAsCategory string LoginGeoId string LoginHistoryId string LoginKey string LoginLatitude float64 LoginLongitude float64 LoginSubType string LoginType string LoginUrl string Operation string ParentIdList string ParentNameList string PermissionExpirationList string PermissionList string PermissionType string Platform string PolicyId string PolicyOutcome string PostalCode string PreviousIp string PreviousPlatform string PreviousScreen string PreviousUserAgent string PreviousWindow string QueriedEntities string RelatedEventIdentifier string RequestIdentifier string ReplayId string RowsProcessed int64 Score int64 SecurityEventData string SessionKey string SessionLevel string SourceIp string Summary string LoginStatus string Subdivision string TargetUrl string TlsProtocol string UserAgent string UserCount string UserId string UserType string Username string Uri string }
User holds information about a user.