glidecli

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 9 Imported by: 1

README

cli

Common Fate CLI package.

Getting started

Log in:

go run cmd/main.go login

List access rules:

go run cmd/main.go rules list

API context

When logging in, the CLI package creates a file at ~/.commonfate/config which contains the following:

current_context = "default"

[context]
  [context.default]
    dashboard_url = "https://commonfate.example.com"

Where the dashboard_url field is the frontend dashboard URL for a Common Fate deployment.

To determine the backend API URL, the CLI queries for the aws-exports.json file in the dashboard - e.g. https://commonfate.example.com/aws-exports.json. This JSON file contains the API URL, and is the same file that is used by our frontend web app to determine the API URL.

You can find this logic in pkg/config in this repository.

Running in local development

Set the API URL to your localhost:

cf config set api_url http://localhost:8080

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OSSSubCommand = cli.Command{
	Name:  "oss",
	Usage: "Actions for PDK providers",
	Subcommands: []*cli.Command{
		&command.Login,
		&command.Logout,
		&config.Command,
		&rules.Command,
		&provider.Command,
		&targetgroup.Command,
		&handler.Command,
		mw.WithBeforeFuncs(&bootstrap.Command, mw.RequireAWSCredentials()),
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
internal
pkg
authflow
Package authflow handles the OAuth2.0 flow against Cognito.
Package authflow handles the OAuth2.0 flow against Cognito.

Jump to

Keyboard shortcuts

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