common

package
v0.0.0-...-8fe0c81 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright (C) 2020 Serge ALEXANDRE

This file is part of koobind project

koobind is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

koobind is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with koobind. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var Context string
View Source
var HttpConnection *internal.HttpConnection

Global variables. Shared by all commands

View Source
var JsonOutput bool

Variable shared by at least two packages

package logger

View Source
var Provider string

Functions

func DoLogin

func DoLogin(login, password string) *internal.TokenBag

func DoLoginSilently

func DoLoginSilently(login, password string) *internal.TokenBag

Warning: As this function is used by the 'auth' command, which send json result to stdout, it may only send prompt to stderr

func InitHttpConnection

func InitHttpConnection()

func PrintHttpResponseMessage

func PrintHttpResponseMessage(response *http.Response)

func RetrieveTokenBag

func RetrieveTokenBag() *internal.TokenBag

Retrieve the token locally, or, if expired, validate again against the server. Return "" if there is no valid token

func ValidateToken

func ValidateToken(token string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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