vast_client

package module
v0.138.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

README

GO Vast Client

CI Go Report Card Coverage Status Go Reference

Check docs at https://vast-data.github.io/go-vast-client/

Documentation

Overview

Package vast_client provides a Go client library for the VAST Data Management System (VMS) REST API.

Two client types are available:

  • VMSRest (untyped): Flexible map-based client. Recommended for most use cases.
  • TypedVMSRest: Strongly-typed client with compile-time safety.

Package vast_client provides a typed and convenient interface to interact with the VAST Data REST API.

It wraps raw HTTP operations in a structured API, exposing high-level methods to manage VAST resources like views, volumes, quotas, snapshots, and more. Each resource is available as a sub-client that supports common CRUD operations (List, Get, GetById, Create, Update, Delete, etc.).

The main entry point is the VMSRest client, which is initialized using a VMSConfig configuration struct. This configuration allows customization of connection parameters, credentials (username/password or token), SSL behavior, request timeouts, and request/response hooks.

Index

Constants

This section is empty.

Variables

View Source
var (
	// IsNotFoundErr checks if the error is a 404 Not Found error.
	IsNotFoundErr = core.IsNotFoundErr

	// IgnoreNotFound returns nil if the error is a 404, otherwise returns the original error.
	IgnoreNotFound = core.IgnoreNotFound

	// IgnoreStatusCodes returns nil if the error is an API error with one of the specified status codes.
	IgnoreStatusCodes = core.IgnoreStatusCodes

	// ExpectStatusCodes checks if the error is an API error with one of the specified status codes.
	ExpectStatusCodes = core.ExpectStatusCodes

	// IsApiError checks if the error is an ApiError.
	IsApiError = core.IsApiError
)

Error handling functions

Functions

This section is empty.

Types

type ApiError

type ApiError = core.ApiError

ApiError represents an error from the VAST API.

type DisplayableRecord added in v0.4.0

type DisplayableRecord = core.DisplayableRecord

DisplayableRecord is an interface for records that can be displayed.

type InterceptableVastResourceAPI added in v0.3.0

type InterceptableVastResourceAPI = core.InterceptableVastResourceAPI

InterceptableVastResourceAPI adds request/response interception to VastResourceAPIWithContext.

type Params

type Params = core.Params

Params is a map[string]any for flexible API parameters.

type Record

type Record = core.Record

Record is a single API response as map[string]any.

type RecordSet

type RecordSet = core.RecordSet

RecordSet is a collection of Record objects.

type Renderable

type Renderable = core.Renderable

Renderable is the interface for Record and RecordSet.

type TypedVMSRest added in v0.103.0

type TypedVMSRest = rest.TypedVMSRest

TypedVMSRest is the strongly-typed client with compile-time type safety.

func NewTypedVMSRest added in v0.100.0

func NewTypedVMSRest(config *VMSConfig) (*TypedVMSRest, error)

NewTypedVMSRest creates a strongly-typed client with compile-time type safety. Use when you need strict API contracts and IDE auto-completion.

type VMSConfig

type VMSConfig = core.VMSConfig

VMSConfig holds connection and authentication configuration for a VAST cluster.

type VMSRest

type VMSRest = rest.UntypedVMSRest

VMSRest is the default untyped client using map[string]any. Recommended for most use cases.

func NewVMSRest

func NewVMSRest(config *VMSConfig) (*VMSRest, error)

NewVMSRest creates the default untyped client using map[string]any for flexible resource handling. Recommended for most use cases. Adapts to API changes without regeneration.

type VastResourceAPI added in v0.3.0

type VastResourceAPI = core.VastResourceAPI

VastResourceAPI defines standard CRUD operations for VAST resources.

type VastResourceAPIWithContext added in v0.3.0

type VastResourceAPIWithContext = core.VastResourceAPIWithContext

VastResourceAPIWithContext extends VastResourceAPI with context support.

Directories

Path Synopsis
examples
typed/apitoken command
typed/group command
typed/host command
typed/quota command
typed/snapshot command
typed/tenant command
typed/user command
typed/user_key command
typed/version command
typed/view command
typed/vippool command
untyped/group command
untyped/host command
untyped/metrics command
untyped/quota command
untyped/tenant command
untyped/user command
untyped/version command
untyped/view command
untyped/vippool command
resources

Jump to

Keyboard shortcuts

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