go-sfdc: github.com/g8rswimmer/go-sfdc/composite/batch Index | Files

package batch

import "github.com/g8rswimmer/go-sfdc/composite/batch"


Package Files

batch.go mock_session_formatter.go

type Resource Uses

type Resource struct {
    // contains filtered or unexported fields

Resource is the structure that can be just to call composite batch APIs.

func NewResource Uses

func NewResource(session session.ServiceFormatter) (*Resource, error)

NewResource creates a new resourse with the session. If the session is nil an error will be returned.

func (*Resource) Retrieve Uses

func (r *Resource) Retrieve(haltOnError bool, requesters []Subrequester) (Value, error)

Retrieve will retrieve the responses to a composite batch requests. The order of the array is the order in which the subrequests are placed in the composite batch body.

type Subrequester Uses

type Subrequester interface {
    URL() string
    Method() string
    BinaryPartName() string
    BinaryPartNameAlias() string
    RichInput() map[string]interface{}

Subrequester provides the composite batch API requests.

type Subvalue Uses

type Subvalue struct {
    Result     interface{} `json:"result"`
    StatusCode int         `json:"statusCode"`

Subvalue is the subresponses to the composite batch API.

type Value Uses

type Value struct {
    HasErrors bool       `json:"hasErrors"`
    Results   []Subvalue `json:"results"`

Value is the returned structure from the composite batch API response.

Package batch imports 7 packages (graph). Updated 2019-05-11. Refresh now. Tools for package owners.