app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: MIT Imports: 9 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 {
	Client *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) GetCSRFToken added in v0.3.0

func (c *Client) GetCSRFToken() string

func (*Client) GetUserInfo added in v0.3.0

func (c *Client) GetUserInfo() models.User

func (*Client) HandleRequest

func (a *Client) HandleRequest(method, url string, payload any) (*http.Response, error)

func (*Client) HandleResponse

func (a *Client) HandleResponse(resp *http.Response, out models.Scannable) (string, error)

func (*Client) SetCSRFToken added in v0.3.0

func (c *Client) SetCSRFToken(token string)

func (*Client) SetUserInfo added in v0.3.0

func (c *Client) SetUserInfo(info models.User)

type ClientHandler added in v0.3.0

type ClientHandler interface {
	GetUserInfo() models.User
	SetUserInfo(info models.User)
	GetCSRFToken() string
	SetCSRFToken(token string)
	HandleRequest(method string, url string, payload any) (*http.Response, error)
	HandleResponse(resp *http.Response, out models.Scannable) (string, error)
}

Jump to

Keyboard shortcuts

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