abax

package module
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ABAX Go

PkgGoDev GoReportCard CI

A Go SDK and CLI tool for the ABAX Open API.

SDK

Features
  • TODO
Installing
$ go get github.com/way-platform/abax-go
Using
// TODO
Developing

See AGENTS.md.

CLI tool

The abax CLI tool enables interaction with the APIs from the command line.

Installing
go install github.com/way-platform/abax-go/cmd/abax@latest

Prebuilt binaries for Linux, Windows, and Mac are available from the Releases.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOAuth2Config added in v0.4.0

func NewOAuth2Config(clientID, clientSecret string) *oauth2.Config

NewOAuth2Config creates a new OAuth2 config for the Abax API using authorization code flow.

Types

type Client

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

Client to the Abax management APIs.

func NewClient

func NewClient(ctx context.Context, opts ...ClientOption) (*Client, error)

NewClient creates a new Abax API client.

func (*Client) ListVehicles added in v0.4.0

func (c *Client) ListVehicles(ctx context.Context, request *ListVehiclesRequest) (*ListVehiclesResponse, error)

ListVehicles lists all vehicles in the current organization.

Required scopes: - abax_profile - open_api - open_api.vehicles

type ClientConfig

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

ClientConfig configures a Client.

type ClientOption

type ClientOption func(*ClientConfig)

ClientOption is a configuration option for a Client.

func WithAccessToken added in v0.4.0

func WithAccessToken(accessToken string) ClientOption

WithAccessToken sets the access token for the client.

func WithClientID added in v0.4.0

func WithClientID(clientID string) ClientOption

WithClientID sets the client ID for the client.

func WithClientSecret added in v0.4.0

func WithClientSecret(clientSecret string) ClientOption

WithClientSecret sets the client secret for the client.

func WithRefreshToken

func WithRefreshToken(refreshToken string) ClientOption

WithRefreshToken sets the refresh token for the client.

type Error added in v0.4.0

type Error struct {
	// Status is the HTTP status code of the response.
	Status string `json:"code"`
}

Error is an error returned by the Abax API.

func (*Error) Error added in v0.4.0

func (e *Error) Error() string

type ListVehiclesRequest added in v0.4.0

type ListVehiclesRequest struct {
	Page     int32 `json:"page,omitempty"`
	PageSize int32 `json:"pageSize,omitempty"`
}

ListVehiclesRequest is the request for the Client.ListVehicles method.

type ListVehiclesResponse added in v0.4.0

type ListVehiclesResponse struct {
	Page     int32             `json:"page"`
	PageSize int32             `json:"pageSize"`
	Vehicles []*abaxv1.Vehicle `json:"items"`
}

ListVehiclesResponse is the response for the Client.ListVehicles method.

Directories

Path Synopsis
internal
oapi/abaxoapi
Package abaxoapi provides primitives to interact with the openapi HTTP API.
Package abaxoapi provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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