restapi

package
v0.0.0-...-6bb103f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeBasic            = "basic"
	AuthTypeBearer           = "bearer"
	AuthTypeSalesforceOauth  = "SalesforceOauth"
	DefaultBatchSize         = 10
	DefaultBatchDelaySeconds = 3
)

Variables

This section is empty.

Functions

func NewRestAPISource

func NewRestAPISource(sourceConfig internal.SourceConfig) (internal.Source, error)

NewRestAPISource unmarshals the sourceConfig's ExtraJson into a RestApi struct

Types

type RestAPI

type RestAPI struct {
	RequestMethod     string
	BaseURL           string
	AuthType          string
	Username          string
	Password          string
	ClientID          string
	ClientSecret      string
	UserAgent         string
	BatchSize         int
	BatchDelaySeconds int
	// contains filtered or unexported fields
}

func (*RestAPI) ForSet

func (r *RestAPI) ForSet(setName string, syncSetJson json.RawMessage) error

ForSet sets this RestAPI structs Path value to the one in the unmarshalled setJson. It ensures the resulting Path attribute includes an initial "/"

func (*RestAPI) Read

func (r *RestAPI) Read() ([]byte, error)

type SalesforceAuthResponse

type SalesforceAuthResponse struct {
	ID          string `json:"id"`
	IssuedAt    string `json:"issued_at"`
	InstanceURL string `json:"instance_url"`
	Signature   string `json:"signature"`
	AccessToken string `json:"access_token"`
}

type SetConfig

type SetConfig struct {
	Path string
}

Jump to

Keyboard shortcuts

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