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 ¶
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 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 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 VMSRest ¶
type VMSRest = rest.UntypedVMSRest
VMSRest is the default untyped client using map[string]any. Recommended for most use cases.
func NewVMSRest ¶
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/nonlocaluser_key
command
|
|
|
typed/protected_path
command
|
|
|
typed/protectionpolicy
command
|
|
|
typed/quota
command
|
|
|
typed/snapshot
command
|
|
|
typed/tenant
command
|
|
|
typed/user
command
|
|
|
typed/user_key
command
|
|
|
typed/user_tenant_data
command
|
|
|
typed/version
command
|
|
|
typed/view
command
|
|
|
typed/vippool
command
|
|
|
untyped/apitoken
command
|
|
|
untyped/group
command
|
|
|
untyped/host
command
|
|
|
untyped/iterator
command
|
|
|
untyped/metrics
command
|
|
|
untyped/nonlocaluser
command
|
|
|
untyped/nonlocaluser_key
command
|
|
|
untyped/protectionpolicy
command
|
|
|
untyped/quota
command
|
|
|
untyped/snapshot
command
|
|
|
untyped/tenant
command
|
|
|
untyped/user
command
|
|
|
untyped/user_key
command
|
|
|
untyped/user_tenant_data
command
|
|
|
untyped/version
command
|
|
|
untyped/view
command
|
|
|
untyped/vippool
command
|
|
|
resources
|
|