restclient

package
v0.0.0-...-fc5e57c Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client           retryablehttp.Client
	ClientDo         = Client.Do
	RestClient       *RESTClient
	UpdateOAuthToken = config.UpdateOAuthToken
	OverridesApplied = config.OverridesApplied
)

Functions

func Authorize

Authorize authenticates the user using the client credentials in their profile.

func ReAuthenticate

func ReAuthenticate(c config.Configuration) (models.OAuthTokenData, error)

ReAuthenticate re-authenticates the user using the client credentials in their profile.

Types

type RESTClient

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

func NewRESTClient

func NewRESTClient(config config.Configuration) *RESTClient

NewRESTClient is a constructor function to build an APIClient

func (*RESTClient) Delete

func (r *RESTClient) Delete(uri string) (string, error)

Delete executes an HTTP Delete

func (*RESTClient) Get

func (r *RESTClient) Get(uri string) (string, error)

Get executes an HTTP Get

func (*RESTClient) Head

func (r *RESTClient) Head(uri string) (string, error)

Head executes an HTTP Head

func (*RESTClient) Patch

func (r *RESTClient) Patch(uri string, data string) (string, error)

Patch executes an HTTP Patch

func (*RESTClient) Post

func (r *RESTClient) Post(uri string, data string) (string, error)

Post executes an HTTP Post

func (*RESTClient) Put

func (r *RESTClient) Put(uri string, data string) (string, error)

Put executes an HTTP Put

func (*RESTClient) SetConfig

func (r *RESTClient) SetConfig(c config.Configuration)

func (*RESTClient) SetEnv

func (r *RESTClient) SetEnv(env string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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