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

package composite

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


Package Files

composite.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 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(allOrNone bool, requesters []Subrequester) (Value, error)

Retrieve will retrieve the responses to a composite requests.

type Subrequester Uses

type Subrequester interface {
    URL() string
    ReferenceID() string
    Method() string
    HTTPHeaders() http.Header
    Body() map[string]interface{}

Subrequester provides the composite API requests. The order of the array is the order in which the subrequests are placed in the composite body.

type Subvalue Uses

type Subvalue struct {
    Body           interface{}       `json:"body"`
    HTTPHeaders    map[string]string `json:"httpHeaders"`
    HTTPStatusCode int               `json:"httpStatusCode"`
    ReferenceID    string            `json:"referenceId"`

Subvalue is the subresponses to the composite API. Using the referende id, one will be able to match the response with the request.

type Value Uses

type Value struct {
    Response []Subvalue `json:"compositeResponse"`

Value is the returned structure from the composite API response.



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