Code Monkey home page Code Monkey logo

cleura-client-go's Introduction

cleura-client-go

Cleura API Client and a CLI application

Installation

go install github.com/aztekas/cleura-client-go/cmd/cleura@latest

Tip

Check latest available version on the release page

Usage and functionality

$ cleura -h

NAME:
   cleura - A Cleura API CLI

USAGE:
   cleura [global options] command [command options]

VERSION:
   latest-uncommitted

COMMANDS:
   config   Command used for working with configuration file for the cleura cli
   domain   Command used to perform actions with available domains
   project  Command used to perform operations with projects
   token    Command used to perform actions with Cleura API tokens
   shoot    Command used to perform operations with shoot clusters
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --loglevel value  (default: "info")
   --help, -h        show help
   --version, -v     print the version

Credentials

Cleura CLI requires a token to query Cleura API. The easiest way to get token is to generate it providing username and password to the cleura token get command (or use corresponding environment variables).

$ cleura token get -h

NAME:
   cleura token get - Receive token from Cleura API using username and password

USAGE:
   cleura token get [command options] [arguments...]

DESCRIPTION:
   Receive token from Cleura API using username and password

OPTIONS:
   --config-path value  Path to configuration file. $HOME/.config/cleura/config if not set
   --help, -h           show help
   --interactive, -i    Interactive mode. Input username and password in interactive mode (default: false)
   --two-factor, --2fa  Set this flag if two-factor authentication (sms) is enabled in your cleura profile  (default: false)
   --update-config      Save token to active configuration. NB: token saved in open text (default: true)

   Cleura auth settings

   --api-host value, --host value  Cleura API host (default: "https://rest.cleura.cloud") [$CLEURA_API_HOST]
   --password value, -p value      Password for token request. [$CLEURA_API_PASSWORD]
   --username value, -u value      Username for token request [$CLEURA_API_USERNAME]

For convenience, you can, first, generate a cleura configuration file with generate-template command:

$ cleura config generate-template -h

NAME:
   cleura config generate-template - Generate configuration file template on the given path

USAGE:
   cleura config generate-template [command options] [arguments...]

DESCRIPTION:
   Generate configuration file template on the given path

OPTIONS:
   --output-file value, -o value  Path to configuration file. $HOME/.config/cleura/config if not set. NB: Overwrites existing if found
   --help, -h                     show help

and then issue cleura token get -u <username> -p <password> --update-config command. Token will then be written to the configuration file in open text. Following cleura CLI commands will first try to use configuration file for receiving username and token values. Use the same command if token is revoked or outdated.

Commands that require username and token values would also attempt to read CLEURA_API_USERNAME and CLEURA_API_TOKEN environmental variables.

cleura-client-go's People

Contributors

zaikinlv avatar

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.