cmd

package
v0.1.81 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GridDBTypes = []string{
	"BOOL",
	"STRING",
	"BYTE",
	"SHORT",
	"INTEGER",
	"LONG",
	"FLOAT",
	"DOUBLE",
	"TIMESTAMP",
	"GEOMETRY",
	"BLOB",
	"BOOL_ARRAY",
	"STRING_ARRAY",
	"BYTE_ARRAY",
	"SHORT_ARRAY",
	"INTEGER_ARRAY",
	"LONG_ARRAY",
	"FLOAT_ARRAY",
	"DOUBLE_ARRAY",
	"TIMESTAMP_ARRAY",
}
View Source
var (
	RootCmd = &cobra.Command{
		Use:   "griddb-cloud-cli",
		Short: "A wrapper to making HTTP Requests to your GridDB Cloud Instance",
		Long: `A series of commands to help you manage your cloud-based DB.
Standouts include creating a container and graphing one using 'read graph' and 'create' respectfully`,
	}
)

Functions

func CheckErr

func CheckErr(err error)

This check error is for the User prompt stuff

func CheckForErrors

func CheckForErrors(resp *http.Response)

func CheckIfUnixTime

func CheckIfUnixTime(unixString string) bool

func ConvertUnixToTime

func ConvertUnixToTime(unixString string) time.Time

func ConvertUnixToTimeInt

func ConvertUnixToTimeInt(unixString int64) time.Time

func Execute

func Execute() error

Execute executes the root command.

func MakeNewRequest

func MakeNewRequest(method, endpoint string, body io.Reader) (req *http.Request, e error)

Types

type CloudResults

type CloudResults struct {
	Offset  int       `json:"offset"`
	Limit   int       `json:"limit"`
	Total   int       `json:"total"`
	Rows    [][]any   `json:"rows"`
	Columns []Columns `json:"columns"`
}

type Columns

type Columns struct {
	Name          string `json:"name"`
	Type          string `json:"type"`
	TimePrecision string `json:"timePrecision,omitempty"`
}

type ContainerInfo

type ContainerInfo struct {
	ContainerName string                 `json:"container_name"`
	ContainerType string                 `json:"container_type"`
	RowKey        bool                   `json:"rowkey"`
	Columns       []ContainerInfoColumns `json:"columns"`
}

type ContainerInfoColumns

type ContainerInfoColumns struct {
	Name          string   `json:"name"`
	Type          string   `json:"type"`
	TimePrecision string   `json:"timePrecision,omitempty"`
	Index         []string `json:"index"`
}

type ContainersList

type ContainersList struct {
	Names  []string `json:"names"`
	Offset int      `json:"offset"`
	Limit  int      `json:"limit"`
	Total  int      `json:"total"`
}

type ErrorMsg

type ErrorMsg struct {
	Version      string `json:"version"`
	ErrorCode    int    `json:"errorCode"`
	ErrorMessage string `json:"errorMessage"`
}

type ExpireTime added in v0.1.8

type ExpireTime struct {
	time.Time
}

func (*ExpireTime) UnmarshalJSON added in v0.1.8

func (at *ExpireTime) UnmarshalJSON(b []byte) error

type IP

type IP struct {
	Query string
}

type QueryData

type QueryData struct {
	Name  string
	Type  string
	Value any
}

type SqlResults

type SqlResults struct {
	ResponseSizeByte float32   `json:"responseSizeByte"`
	Results          [][]any   `json:"results"`
	Columns          []Columns `json:"columns"`
}

type TQLResults

type TQLResults struct {
	Offset           int       `json:"offset"`
	Limit            int       `json:"limit"`
	Total            int       `json:"total"`
	ResponseSizeByte int32     `json:"responseSizeByte,omitempty"`
	Results          [][]any   `json:"results"`
	Columns          []Columns `json:"columns"`
}

type TokenManager added in v0.1.8

type TokenManager struct {
	AccessToken string     `json:"accessToken"`
	Expiration  ExpireTime `json:"expiredDate"`
	// contains filtered or unexported fields
}

func NewTokenManager added in v0.1.8

func NewTokenManager() *TokenManager

Jump to

Keyboard shortcuts

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