Documentation ¶
Overview ¶
MIT License
(C) Copyright 2022 Hewlett Packard Enterprise Development LP
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License (C) Copyright 2022 Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. MIT License (C) Copyright 2022 Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. MIT License (C) Copyright 2022 Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. MIT License (C) Copyright 2022 Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- func GenerateName(prefix string) string
- func RandomString(length int) string
- type Env
- type FxLogger
- type GenericError
- type GinLogger
- type Logger
- type RequestHandler
- type ResponseError
- type ResponseOk
- type Validator
- func (validator Validator) IsMasterHostname(hostname string) (bool, error)
- func (validator Validator) IsStorageHostname(hostname string) (bool, error)
- func (validator Validator) IsWorkerHostname(hostname string) (bool, error)
- func (validator Validator) ValidateHostnames(hostnames []string) error
- func (validator Validator) ValidateLimitManagementNodesInput(limitManagementNodes []string) (string, error)
- func (validator Validator) ValidateManagementRole(managementRole []string) error
- func (validator Validator) ValidateMasterHostnames(hostnames []string) error
- func (validator Validator) ValidateStorageHostnames(hostnames []string) error
- func (validator Validator) ValidateWorkerHostnames(hostnames []string) error
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Options( fx.Provide(NewRequestHandler), fx.Provide(NewEnv), fx.Provide(GetLogger), fx.Provide(NewValidator), )
Module exports dependency
Functions ¶
func GenerateName ¶ added in v0.9.13
GenerateName generates a name with the given prefix. Makes sure result doesn't go beyond 63 characters
func RandomString ¶ added in v0.9.13
RandomString A random string of the given length.
Types ¶
type Env ¶
type Env struct { ServerPort string `mapstructure:"SERVER_PORT"` Environment string `mapstructure:"ENV"` ArgoToken string `mapstructure:"ARGO_TOKEN"` ArgoServerURL string `mapstructure:"ARGO_SERVER_URL"` ApiGatewayURL string `mapstructure:"API_GATEWAY_URL"` WorkerRebuildWorkflowFiles string `mapstructure:"WORKER_REBUILD_WORKFLOW_FILES"` StorageRebuildWorkflowFiles string `mapstructure:"STORAGE_REBUILD_WORKFLOW_FILES"` IufInstallWorkflowFiles string `mapstructure:"IUF_INSTALL_WORKFLOW_FILES"` MediaDirBase string `mapstructure:"MEDIA_DIR_BASE"` }
Env has environment stored
type GenericError ¶ added in v0.9.13
type GenericError struct {
Message string
}
func (GenericError) Error ¶ added in v0.9.13
func (e GenericError) Error() string
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
Logger structure
func (Logger) GetGinLogger ¶
GetGinLogger get the gin logger
type RequestHandler ¶
RequestHandler function
func NewRequestHandler ¶
func NewRequestHandler(logger Logger, env Env) RequestHandler
NewRequestHandler creates a new request handler
type ResponseError ¶
type ResponseError struct { Message string `json:"message"` } //@name ResponseError
type ResponseOk ¶
type ResponseOk struct { Message string `json:"message"` } //@name ResponseOk
type Validator ¶
type Validator struct { }