conform

package
v3.15.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustConform

func MustConform(v interface{})

Performs must conform with buildin transformers

Types

type ConformService

type ConformService struct {
	// contains filtered or unexported fields
}

func NewConformService

func NewConformService() *ConformService

func (*ConformService) Conform

func (s *ConformService) Conform(v interface{}) error

func (*ConformService) GetTransformer

func (s *ConformService) GetTransformer(name string) StringTransformer

func (*ConformService) MustConform

func (s *ConformService) MustConform(v interface{})

func (*ConformService) RegisterStringTransformer

func (s *ConformService) RegisterStringTransformer(name string, transformer StringTransformer)

type Conformer

type Conformer interface {
	ConformSelf(*ConformService)
}

If a type implements this interface, the callback function gets called while conforming

type StringTransformer

type StringTransformer func(string) string

Jump to

Keyboard shortcuts

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