package
module
Version:
v0.0.0-...-992f98f
Opens a new window with list of versions in this module.
Published: May 6, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
chefapi_lib
Common functions used by the other chefapi go modules.
import 'github.com/MarkGibbons/chefapi_lib'
Documentation
¶
Shared structures and common routines
AllOrgs returns a list of all of the organizations
StdMessageStatus extracts the status code from a go-chef api error message
Verify the input characters are allowed
InputError sets an error message for invalid values in the url
LoggedIn verifies the JWT and extracts the user name
type Auth struct {
Auth bool `json:"auth"`
Group string `json:"group"`
Node string `json:"node"`
Org string `json:"org"`
User string `json:"user"`
}
Auth is the structure returned to indicate access allowed or not
type Claims struct {
Username string `json:"username"`
jwt.StandardClaims
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.