request

package
v0.0.0-...-4591d98 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AccountId      string
	ConsumerKey    string
	ConsumerSecret string
	TokenId        string
	TokenSecret    string
}

type Params

type Params struct {
	RecordName  string
	PackageName string
	Config      *Config
}

func (*Params) BuildAuthHeader

func (c *Params) BuildAuthHeader(req *http.Request) string

BuildAuthHeader returns a valid NS OAuth1.0 header

func (*Params) GetBasePath

func (c *Params) GetBasePath() string

GetBasePath returns the server path

func (*Params) GetPackageName

func (c *Params) GetPackageName() string

GetPackageName returns the package name

func (*Params) GetRecordMetadata

func (c *Params) GetRecordMetadata() ([]byte, error)

GetRecordMetadata retrieves record metadata from NetSuite

func (*Params) GetRecordName

func (c *Params) GetRecordName() string

GetRecordName returns the record name

func (*Params) GetWithRequestEditorFn

func (c *Params) GetWithRequestEditorFn(ctx context.Context, req *http.Request) error

GetWithRequestEditorFn adds the default header to the request

type ParamsInterface

type ParamsInterface interface {
	GetWithRequestEditorFn(ctx context.Context, req *http.Request) error
	BuildAuthHeader(req *http.Request) string
	GetBasePath() string
	GetRecordName() string
	GetPackageName() string
	GetRecordMetadata() ([]byte, error)
}

ParamsInterface for parameter methods

func NewParams

func NewParams(params *Params) ParamsInterface

Jump to

Keyboard shortcuts

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