client

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL        = "https://public-api.rustore.ru/public/v1/application"
	AuthURL        = "https://public-api.rustore.ru/public/auth"
	TimeOutSeconds = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(keyID, privateKeyRaw, companyID string) *Client

func (*Client) Auth

func (c *Client) Auth() error

func (*Client) Do

func (c *Client) Do(request *http.Request, opts RequestOpts) (*http.Response, error)

func (*Client) GetEncodedSignature

func (c *Client) GetEncodedSignature(privateKeyRaw string) (string, error)

func (*Client) GetJWEToken

func (c *Client) GetJWEToken(privateKeyComplete string) (string, error)

type JWEToken

type JWEToken struct {
	JWE string `json:"jwe"`
}

type JWETokenResponse

type JWETokenResponse struct {
	Code    string   `json:"code"`
	Message string   `json:"message"`
	Body    JWEToken `json:"body"`
}

type RequestOpts

type RequestOpts struct {
	CustomContentType string
}

Jump to

Keyboard shortcuts

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