duoc

package
v0.0.0-...-449f33c Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearerCredentials

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

func NewBearerCredentials

func NewBearerCredentials(c *Client, jwt string) *BearerCredentials

func (*BearerCredentials) JWT

func (c *BearerCredentials) JWT() string

func (*BearerCredentials) Request

func (c *BearerCredentials) Request() *Request

type Client

type Client struct {
	Client *http.Client
	// contains filtered or unexported fields
}

func NewHost

func NewHost(cfg *config.Config) (*Client, error)

func (*Client) Request

func (c *Client) Request(url, method string, data []byte, bearer interface{}) ([]byte, int, error)

func (*Client) RequestWithQuery

func (c *Client) RequestWithQuery(url, method string, data []byte, queryParams url.Values, bearer interface{}) ([]byte, int, error)

type Credentials

type Credentials interface {
	JWT() string
	Request() *Request
}

type Request

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

func NewRequest

func NewRequest(c *Client, auth Credentials) *Request

Jump to

Keyboard shortcuts

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