api

package
v4.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HttpClient HTTPClient                      // HTTPClient interface for making HTTP requests
	Auth       authentication.AuthenticatorAPI // Authenticator for managing authentication
	OLdomain   string                          // OneLogin domain
	Timeout    time.Duration
}

Client represents the API client.

func NewClient

func NewClient() (*Client, error)

NewClient creates a new instance of the API client.

func (*Client) Delete

func (c *Client) Delete(path *string) (*http.Response, error)

Delete sends a DELETE request to the specified path with the given query parameters.

func (*Client) DeleteWithBody

func (c *Client) DeleteWithBody(path *string, body interface{}) (*http.Response, error)

Delete sends a DELETE request to the specified path with the given query parameters and request body.

func (*Client) Get

func (c *Client) Get(path *string, queryParams mod.Queryable) (*http.Response, error)

Get sends a GET request to the specified path with the given query parameters.

func (*Client) Post

func (c *Client) Post(path *string, body interface{}) (*http.Response, error)

Post sends a POST request to the specified path with the given query parameters and request body.

func (*Client) Put

func (c *Client) Put(path *string, body interface{}) (*http.Response, error)

Put sends a PUT request to the specified path with the given query parameters and request body.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is an interface that defines the Do method for making HTTP requests.

Jump to

Keyboard shortcuts

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