link

package
v0.0.0-...-026b67d Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package link will find and return information for link from json file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe

func Describe(ctx context.Context, env string, app string, serverurl string)

Describe retrieve application link(s) availables In cli compagnyhelper describe link grafana -n dev

func Get

func Get(ctx context.Context, env string, serverurl string)

Get retrieve application link(s) available In cli compagnyhelper get link -n all

func GetDetail

func GetDetail(ctx context.Context, env string, app string, serverurl string)

GetDetail retrieve application link(s) available In cli compagnyhelper get link -n devs

func OpenLink(ctx context.Context, env string, app string, serverurl string)

OpenLink open a link in a browser In cli compagnyhelper open link Kibana -n dev

Types

type Application

type Application struct {
	Shortname string  `json:"shortname"`
	Desc      appdesc `json:"appdesc"`
}

Application describe an application

func Retrieve

func Retrieve(ctx context.Context, env string, name string, inputjson string) (result Application, err error)

Retrieve find the app with env and name provided Send longname value

In cli compagnyhelper get link grafana -n dev, output will be Grafana | http://grafana.com \n

In cli compagnyhelper open link grafana -n dev, output will open a browser with url http://grafana.com

In cli compagnyhelper describe link grafana -n dev Grafana | Your dashboard for your metrics | development | http://grafana.com \n

type ObjectLink struct {
	Applications []Application `json:"applications"`
}

ObjectLink describe multiple applications

func RetrieveAll

func RetrieveAll(ctx context.Context, env string, inputjson string) (result ObjectLink, err error)

RetrieveAll find all links with env Send an array of application struct

In cli compagnyhelper get link -n dev, output will be Grafana \n Kibana \n Prometheus \n

In cli compagnyhelper get link --all, output will be Grafana dev \n Kibana dev \n Grafana prod \n

Jump to

Keyboard shortcuts

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