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/>.
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/>.
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 ¶
- func ConfigureLogger(ll string, json bool)
- func DeleteTokenBag(context string)
- func ListContext() []string
- func ReturnCodeFromStatusCode(sc int) int
- func SaveConfig(context string, config *Config)
- func SaveTokenBag(context string, tokenBag *TokenBag)
- type Config
- type CurrentContext
- type HttpAuth
- type HttpConnection
- type TokenBag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogger ¶
func DeleteTokenBag ¶
func DeleteTokenBag(context string)
Better to test and remove. Alternate would be to remove withhout testing, but this may hide some errors
func ListContext ¶
func ListContext() []string
func SaveConfig ¶
func SaveTokenBag ¶
Types ¶
type Config ¶
type Config struct { Server string `json:"server"` RootCaFile string `json:"rootCaFile"` Client proto_v2.AuthClient }
func LoadConfig ¶
type CurrentContext ¶
type CurrentContext struct {
Context string `json:"context"`
}
type HttpConnection ¶
type HttpConnection struct { BaseUrl string // contains filtered or unexported fields }
Concurrent safe, as http.Client is and baseUrl is not mutated.
func NewHttpConnection ¶
func NewHttpConnection(baseUrl string, rootCaFile string, log *logrus.Entry) *HttpConnection