rest

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionKey   = "code_level"
	UserRoleKey  = "role"
	ValidVersion = "8.3.1"
)
View Source
const (
	FailedEventThreshold = time.Minute * 2 // 2 minutes
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Username string
	Password string
}

type FSRestClient

type FSRestClient struct {
	Client     *http.Client
	RestConfig Config
	BaseURL    string

	DriverManager *drivermanager.DriverManager
	PostRequester *Requester
	// contains filtered or unexported fields
}

func (*FSRestClient) CheckFlashsystemClusterState

func (c *FSRestClient) CheckFlashsystemClusterState() (bool, error)

func (*FSRestClient) CheckUserRole

func (c *FSRestClient) CheckUserRole() (bool, error)

func (*FSRestClient) CheckVersion

func (c *FSRestClient) CheckVersion() (bool, error)

func (*FSRestClient) LsAllMDisk added in v1.3.0

func (c *FSRestClient) LsAllMDisk() (MDisksList, error)

func (*FSRestClient) LsSingleMDisk added in v1.3.0

func (c *FSRestClient) LsSingleMDisk(diskID int) (SingleMDiskInfo, error)

func (*FSRestClient) Lscurrentuser

func (c *FSRestClient) Lscurrentuser() (Users, error)

func (*FSRestClient) Lsmdiskgrp

func (c *FSRestClient) Lsmdiskgrp() (PoolList, error)

func (*FSRestClient) Lsnode

func (c *FSRestClient) Lsnode() (Nodes, error)

func (*FSRestClient) Lssystem

func (c *FSRestClient) Lssystem() (StorageSystem, error)

func (*FSRestClient) Lssystemstats

func (c *FSRestClient) Lssystemstats() (SystemStats, error)

func (*FSRestClient) NewFSRestClient added in v1.3.0

func (c *FSRestClient) NewFSRestClient(config Config, driverManager *drivermanager.DriverManager) (*FSRestClient, error)

func (*FSRestClient) UpdateCredentials added in v1.3.0

func (c *FSRestClient) UpdateCredentials(newConfig Config) error

type MDisksList added in v1.3.0

type MDisksList []map[string]interface{}

type Nodes

type Nodes []map[string]string

type PoolList

type PoolList []map[string]interface{}

Pool list, result of lsmdiskgrp

type Poster

type Poster func(req *http.Request, c *FSRestClient) ([]byte, int, error)

For easy mock the request response

type Requester

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

func NewRequester

func NewRequester(p Poster) *Requester

type SingleMDiskInfo added in v1.3.0

type SingleMDiskInfo map[string]interface{}

type StorageSystem

type StorageSystem map[string]interface{}

type SystemStats

type SystemStats []map[string]string

type Users

type Users []map[string]interface{}

Jump to

Keyboard shortcuts

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