 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( // RegexAlphabetLower const RegexAlphabetLower = "a-z" // RegexAlphabetUpper const RegexAlphabetUpper = "A-Z" // RegexNumeric const RegexNumeric = "0-9" // RegexDash const RegexDash = "-" // AlphabetLower const AlphabetLower = "alfabet kecil" // AlphabetUpper const AlphabetUpper = "alfabet besar" // Numeric const Numeric = "numerik" // Dash const Dash = "strip" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONSchemaValidator ¶
type JSONSchemaValidator struct {
}
    JSONSchemaValidator validator
func NewJSONSchemaValidator ¶
func NewJSONSchemaValidator(schemaRootPath string) *JSONSchemaValidator
NewJSONSchemaValidator constructor
func (*JSONSchemaValidator) ValidateDocument ¶
func (v *JSONSchemaValidator) ValidateDocument(schemaID string, documentSource interface{}) error
ValidateDocument based on schema id
type StructValidator ¶
type StructValidator struct {
	// contains filtered or unexported fields
}
    StructValidator struct
func NewStructValidator ¶
func NewStructValidator() *StructValidator
NewStructValidator using go library https://github.com/go-playground/validator (all struct tags will be here) https://godoc.org/github.com/go-playground/validator (documentation using it) NewStructValidator function
func (*StructValidator) ValidateStruct ¶
func (v *StructValidator) ValidateStruct(data interface{}) error
ValidateStruct function
type Validator ¶
type Validator struct {
	*JSONSchemaValidator
	*StructValidator
}
    Validator instance
func NewValidator ¶
func NewValidator() *Validator
NewValidator constructor, using jsonschema & struct validator (github.com/go-playground/validator), jsonschema source file load from "api/jsonschema" directory
 Click to show internal directories. 
   Click to hide internal directories.