validate

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

validate

Table of Contents

  1. Description
  2. Structure and Organisation
  3. Class Diagram
  4. Functionality
  5. Data Types
  6. Testing
  7. Proposed Functionality/Requirements
  8. References

Specification

Description TBD

Utils specifically used for the validation of different types.

Structure and Organisation

Here is quick overview of the contents of this directory:

  • README: Current file which is aimed towards developers who wish to use and modify the package functionality.

  • numerics: This file contains method for conversion of numerical data to float64 type.

  • strings: This file contains method for validation check of data types.

  • specs: This folder contains the class diagram of the package.

Class Diagram
Source File

validate Class Diagram

Rendered from source file
!$rootUrlGitlab = "https://gitlab.com/nunet/device-management-service/-/raw/main"
!$packageRelativePath = "/utils/validate"
!$packageUrlGitlab = $rootUrlGitlab + $packageRelativePath
 
!include $packageUrlGitlab/specs/class_diagram.puml
Functionality

This package contains helper methods that perform validation check for different data types. Refer to strings.go file for more details.

Data Types

This package does not define any new data types.

Testing

Unit tests for the functionality are defined in files with *_test.go in their names.

Proposed Functionality / Requirements

List of issues related to the implementation of the utils package can be found below. These include proposals for modifications to the package or new functionality needed to cover the requirements of other packages.

References

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBlank

func IsBlank(s string) bool

IsBlank checks if a string is empty or contains only whitespace

func IsDNSNameValid

func IsDNSNameValid(name string) bool

IsDNSNameValid performs DNS name validation using regex

func IsDockerImageValid

func IsDockerImageValid(image string) bool

IsDockerImageValid validates docker image format with a single regex

func IsEnvVarKeyValid

func IsEnvVarKeyValid(key string) bool

IsEnvVarKeyValid validates environment variable key format

func IsLiteral

func IsLiteral(s interface{}) bool

IsLiteral just checks if a variable is a string

func IsNotBlank

func IsNotBlank(s string) bool

IsNotBlank checks if a string is not empty and does not contain only whitespace

Types

This section is empty.

Jump to

Keyboard shortcuts

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