Versions in this module Expand all Collapse all v0 v0.0.3 Jul 29, 2023 v0.0.2 Jul 28, 2023 v0.0.1 Jul 28, 2023 Changes in this version + const ENV_DB_NAME + const ENV_DB_PATH + const ENV_HOST + const ENV_HOSTNAME + const ENV_LOG_FORMAT + const ENV_LOG_LEVEL + const ENV_PORT + const ENV_PREFIX + const ENV_PRODUCTION + const ENV_TLS_CA_CRT_PATH + const ENV_TLS_CLIENT_CA_CRT_PATH + const ENV_TLS_CRT_PATH + const ENV_TLS_KEY_PATH + const INIT_DB_RES_CREATED + const INIT_DB_RES_ERROR + const INIT_DB_RES_EXISTED + const IS_ROOT + const PATH_CAPABILITIES + const SESSION_POLICIES + const VAULT_TOKEN + const VAULT_TOKEN_HEADER + const VAULT_TOKEN_MODEL + func Bind(c *gin.Context, obj interface{}) error + func CreateDBIfNotExists(c *Config) (int, error) + func DecBytesFromB64(str string) ([]byte, error) + func DecFromB64(str string) (string, error) + func EncToB64(str string) string + func GetDB() (*gorm.DB, error) + func GetLogger() (hclog.Logger, error) + func GetRequestPath(c *gin.Context) string + func JSONMiddleware(replaceExistingContentType bool) gin.HandlerFunc + func ParseBool(str string, def bool) bool + func ParseInt(str string, def int) int + func RequestIDMiddleware() gin.HandlerFunc + func TrimPrefix(s string, pref string) string + func VerifyCreateAccess(c *gin.Context) bool + func VerifyListAccess(c *gin.Context) bool + type CommonError struct + Errors []string + func NewError(key string, err error) CommonError + type Config struct + Args *Params + DB *gorm.DB + DBStatus int + Lock sync.RWMutex + Logger hclog.Logger + TLS *TLSConfig + func DefaultConfig() (*Config, error) + func GetConfig() (*Config, error) + type GenericResponse struct + Auth *interface{} + Data interface{} + LeaseDuration int + LeaseID string + Renewable bool + RequestID string + Warnings *[]string + WrapInfo *interface{} + func NewGenericResponse(c *gin.Context, data interface{}) GenericResponse + type GenericResponseSerializer struct + C *gin.Context + func (s *GenericResponseSerializer) Response(data interface{}) GenericResponse + type LogConfig struct + LogFormat string + LogLevel string + type Params struct + DBName string + DBPath string + Host string + IsProduction bool + LogConfig *LogConfig + Port int + type StatusResponse struct + Code int + Status string + func NewStatusResponse(code int, status string) StatusResponse + type TLSConfig struct + BundleCrt string + CACrt string + TLSConfig *tls.Config + TLSCrt string + TLSKey string