Code Monkey home page Code Monkey logo

regatta-client's Introduction

Release Go version License: MIT Tantalor93 lint goreleaser-check codecov Go Report Card

regatta-client

CLI client for querying Regatta store

Installation

you can install regatta-client using Homebrew

brew tap tantalor93/regatta-client
brew install regatta-client

or using Go tooling

go install github.com/tantalor93/regatta-client@latest

or you can download the latest binary archive for your operating system and architecture here

Docker

you can also run regatta-client in a Docker container using provided image

docker run ghcr.io/tantalor93/regatta-client --version

Usage

Command-line tool wrapping API calls to Regatta (https://engineering.jamf.com/regatta/).
Simplifies querying for data in Regatta store and other operations.

Usage:
  regatta-client [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  delete      Delete data from Regatta store
  help        Help about any command
  man         Generates man pages
  put         Put data into Regatta store
  range       Retrieve data from Regatta store
  table       Print available tables
  version     Get current version of regatta-client and a Regatta server

Flags:
      --cert string             Regatta CA cert
      --dial-timeout duration   timeout for establishing the connection to the Regatta (default 2s)
      --endpoint string         Regatta API endpoint (default "localhost:8443")
  -h, --help                    help for regatta-client
      --insecure                allow insecure connection, controls whether certificates are validated
      --no-color                disable color output
      --timeout duration        timeout for the Regatta operation (default 10s)
  -v, --version                 version for regatta-client

Use "regatta-client [command] --help" for more information about a command.

Examples

Get all tables

this example retrieves all available tables in the Regatta store

regatta-client table

Get client and server version

this example prints client and Regatta server version

regatta-client version

Get all records in a table

this example retrieves all records in the example-table table

regatta-client range example-table

Get all records in a table without decoding keys/values to UTF-8 strings

this example retrieves all records in the example-table table without decoding binary data, this is achieved by using the --binary flag. Retrieved key-value pairs are shown as Base64 strings

regatta-client range example-table --binary 

Get a record by a key in a table

this example retrieves a record with the key example-key in the example-table table

regatta-client range example-table example-key

Get all records with the given prefix in a table

this example retrieves all records with keys prefixed with example in the example-table table. Note the asterisk, when doing a prefix search! Without the asterisk, it is not a prefix search

regatta-client range example-table 'example*'

Delete record by key in a table

this example deletes the record with the key example-key in the example-table table

regatta-client delete example-table example-key

Delete all records with the given prefix in a table

this example deletes all records with keys prefixed with example in the example-table table. Note the asterisk, when doing prefix delete! Without the asterisk, it is not a prefix delete

regatta-client delete example-table 'example*'

Delete all records in a table

this example deletes all records in the example-table table

regatta-client delete example-table '*'

Put data into a table

this example inserts (or updates existing record with the same key) into table example-table a record with key example-key and value example-value

regatta-client put example-table example-key example-value

Put binary data into a table

to put binary data into Regatta using this tool, you need to encode the value using Base64 and use the --binary flag, For example, this inserts into table example-table a record with key example-key and value example-value, where the value was provided encoded as Base64 string

regatta-client put example-table example-key ZXhhbXBsZS12YWx1ZQ== --binary

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.