Documentation
¶
Index ¶
- Constants
- type AuthOption
- type Entity
- func (e *Entity[T]) BuildQuery(fields string, constraints string) string
- func (e *Entity[T]) List(ctx context.Context) (<-chan []T, <-chan error)
- func (e *Entity[T]) ListModifiedSince(ctx context.Context, since time.Time) (<-chan []T, <-chan error)
- func (e *Entity[T]) Query(ctx context.Context, query string) ([]T, error)
- func (e *Entity[T]) QueryAsync(ctx context.Context, query string) (<-chan []T, <-chan error)
- func (e *Entity[T]) SetName(name string)
- func (e *Entity[T]) TaggedFields() string
- type Instance
- type InstanceOption
- type Profile
- type QueryResponse
Constants ¶
View Source
const (
// DateTimeLayout is used to convert SFDC DateTime strings correctly
DateTimeLayout = "2006-01-02T15:04:05.000Z"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthOption ¶ added in v0.2.0
type AuthOption interface {
// contains filtered or unexported methods
}
func WithNoAuthentication ¶ added in v0.2.0
func WithNoAuthentication() AuthOption
WithNoAuthentication specifies that you are handling authentication yourself. You should consider using WithHTTPClient to provide your authenticated HTTPClient.
type Entity ¶ added in v0.2.0
type Entity[T any] struct { // contains filtered or unexported fields }
func (*Entity[T]) BuildQuery ¶ added in v0.2.0
func (*Entity[T]) ListModifiedSince ¶ added in v0.2.0
func (e *Entity[T]) ListModifiedSince(ctx context.Context, since time.Time) (<-chan []T, <-chan error)
ListModifiedSince finds all T objects modified since some point in time.
func (*Entity[T]) QueryAsync ¶ added in v0.2.0
QueryAsync returns a channel that T are written to. The channel is closed when all records have been written. Errors are written to the returned error channel. The query aborts when an error is encountered.
func (*Entity[T]) TaggedFields ¶ added in v0.2.0
type Instance ¶ added in v0.2.0
type Instance struct {
// contains filtered or unexported fields
}
func New ¶
func New(auth AuthOption, options ...InstanceOption) (*Instance, error)
func (*Instance) InstanceURL ¶ added in v0.2.0
type InstanceOption ¶ added in v0.2.0
type InstanceOption interface {
// contains filtered or unexported methods
}
func WithAPIVersion ¶ added in v0.2.0
func WithAPIVersion(version string) InstanceOption
func WithHTTPClient ¶ added in v0.2.0
func WithHTTPClient(client *http.Client) InstanceOption
func WithURL ¶ added in v0.2.0
func WithURL(url string) InstanceOption
type Profile ¶ added in v0.2.1
type Profile struct { ID string `json:"id,omitempty"` AssertedUser bool `json:"asserted_user,omitempty"` UserID string `json:"user_id,omitempty"` OrganizationID string `json:"organization_id,omitempty"` Username string `json:"username,omitempty"` Nickname string `json:"nick_name,omitempty"` DisplayName string `json:"display_name,omitempty"` Email string `json:"email,omitempty"` EmailVerified bool `json:"email_verified,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Timezone string `json:"timezone,omitempty"` Photos struct { Picture string `json:"picture,omitempty"` Thumbnail string `json:"thumbnail,omitempty"` } `json:"photos,omitempty"` AddrStreet string `json:"addr_street,omitempty"` AddrCity string `json:"addr_city,omitempty"` AddrState string `json:"addr_state,omitempty"` AddrCountry string `json:"addr_country,omitempty"` AddrZip interface{} `json:"addr_zip,omitempty"` MobilePhone interface{} `json:"mobile_phone,omitempty"` MobilePhoneVerified bool `json:"mobile_phone_verified,omitempty"` IsLightningLoginUser bool `json:"is_lightning_login_user,omitempty"` Status struct { CreatedDate string `json:"created_date,omitempty"` Body string `json:"body,omitempty"` } `json:"status,omitempty"` URLs struct { Enterprise string `json:"enterprise,omitempty"` Metadata string `json:"metadata,omitempty"` Partner string `json:"partner,omitempty"` Rest string `json:"rest,omitempty"` Sobjects string `json:"sobjects,omitempty"` Search string `json:"search,omitempty"` Query string `json:"query,omitempty"` Recent string `json:"recent,omitempty"` ToolingSoap string `json:"tooling_soap,omitempty"` ToolingRest string `json:"tooling_rest,omitempty"` Profile string `json:"profile,omitempty"` Feeds string `json:"feeds,omitempty"` Groups string `json:"groups,omitempty"` Users string `json:"users,omitempty"` FeedItems string `json:"feed_items,omitempty"` FeedElements string `json:"feed_elements,omitempty"` CustomDomain string `json:"custom_domain,omitempty"` } `json:"urls,omitempty"` Active bool `json:"active,omitempty"` UserType string `json:"user_type,omitempty"` Language string `json:"language,omitempty"` Locale string `json:"locale,omitempty"` UtcOffset int `json:"utcOffset,omitempty"` LastModifiedDate time.Time `json:"last_modified_date,omitempty"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.