client

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 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 {
	// contains filtered or unexported fields
}

Client represents an HTTP client for interacting with the API

func NewClient

func NewClient(baseURL string, logger logging.Logger) *Client

NewClient creates a new API client

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context) (*VersionInfo, error)

GetVersion retrieves the application version information

func (*Client) Login

func (c *Client) Login(ctx context.Context, login *user.Login) (*user.TokenPair, error)

Login authenticates a user and returns JWT tokens

func (*Client) Logout

func (c *Client) Logout(ctx context.Context, token string) error

Logout invalidates the user's tokens

func (*Client) SignUp

func (c *Client) SignUp(ctx context.Context, signup *user.Signup) (*user.User, error)

SignUp creates a new user account

type VersionInfo

type VersionInfo struct {
	Version   string `json:"version"`
	BuildTime string `json:"buildTime"`
	GitCommit string `json:"gitCommit"`
	GoVersion string `json:"goVersion"`
}

VersionInfo represents the application version information

Jump to

Keyboard shortcuts

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