phonetype

package
v0.60.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package phonetype defines a custom format for phone numbers.

Index

Constants

This section is empty.

Variables

PhoneFormat defines a custom format for phone numbers.

Functions

This section is empty.

Types

type JSONPhoneEncoding

type JSONPhoneEncoding struct{}

JSONPhoneEncoding defines a custom JSON encoding for phone numbers.

func (JSONPhoneEncoding) DecodeJSON

func (JSONPhoneEncoding) DecodeJSON(d *jx.Decoder) (v Phone, _ error)

DecodeJSON decodes a phone number from a JSON string.

func (JSONPhoneEncoding) EncodeJSON

func (JSONPhoneEncoding) EncodeJSON(e *jx.Encoder, v Phone)

EncodeJSON encodes a phone number as a JSON string.

type Phone

type Phone string

Phone is a phone number.

type TextPhoneEncoding

type TextPhoneEncoding struct{}

TextPhoneEncoding defines a custom text encoding for phone numbers.

func (TextPhoneEncoding) DecodeText

func (TextPhoneEncoding) DecodeText(s string) (v Phone, _ error)

DecodeText decodes a phone number from a string.

func (TextPhoneEncoding) EncodeText

func (TextPhoneEncoding) EncodeText(v Phone) string

EncodeText encodes a phone number as a string.

Jump to

Keyboard shortcuts

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