limits

package
v3.5.1-0...-a4a670e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 3 Imported by: 0

README

Limits Request API

back

The limits package provides a Composite Batch sub-request implementation that is able to fetch organization limit information.

As a reference, see the Salesforce Limit Resource documentation.

resource, err := batch.NewResource(session)
if err != nil {
    fmt.Printf("Batch Composite Error %s\n", err.Error())
    return
}

value, err := resource.Retrieve(false, []batch.Subrequester{
    limits.NewSubrequester(),
})
if err != nil {
    fmt.Printf("Batch Composite Error %s\n", err.Error())
    return
}

// value.Results[0] will contain the limit request response;
// if successful, value.Results[0].Result will be a map[string]interface{}
// containing the limits as described in the documentation.
fmt.Printf("%+v\n", value)

Documentation

Overview

Package limits provides a batch Subrequester that fetches account limit information

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LimitRequest

type LimitRequest struct {
	// contains filtered or unexported fields
}

LimitRequest provides an batch subrequester that will fetch the current account limits

func NewSubrequester

func NewSubrequester(sess session.ServiceFormatter) *LimitRequest

NewSubrequester returns a new limit subrequester

func NewSubrequesterWithVersion

func NewSubrequesterWithVersion(sess session.ServiceFormatter, version int) *LimitRequest

NewSubrequesterWithVersion returns a new limit subrequester with a specific API version

func (*LimitRequest) BinaryPartName

func (l *LimitRequest) BinaryPartName() string

BinaryPartName fulfills batch.Subrequester; it is unused for limits requests

func (*LimitRequest) BinaryPartNameAlias

func (l *LimitRequest) BinaryPartNameAlias() string

BinaryPartNameAlias fulfills batch.Subrequester; it is unused for limits requests

func (*LimitRequest) Method

func (l *LimitRequest) Method() string

Method returns the HTTP method for the limits request

func (*LimitRequest) RichInput

func (l *LimitRequest) RichInput() map[string]interface{}

RichInput fulfills batch.Subrequester; it is unused for limits requests

func (*LimitRequest) URL

func (l *LimitRequest) URL() string

URL returns the URL for the limits request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL