Values
Technical reference of Valores.
Symbols
| Symbol | Class | Description |
|---|---|---|
| HTML | type | It represents reliable HTML within the GOX transport. |
type | Email defines a public type of API. | |
| NewEmail | func | Build NewEmail. |
| Email.Address | func | Add Address. |
| Email.Username | func | Returns the local part of the address. |
| Email.Domain | func | Returns the address domain. |
| Email.String | func | Returns the full textual representation. |
| Email.IsZero | func | Indicates the state of IsZero. |
| Email.CheckMX | func | Check if the domain publishes MX records. |
| Writer | type | Write Writer. |
HTML
HTML represents reliable HTML content transmitted by GOX.
type HTML string It is not a semantic type of handler and does not replace gox.Component. When sent to JavaScript, the client reconstructs the content as HTMLElement or DocumentFragment.
String()
func (value HTML) String() string Returns HTML content as string.
Bytes()
func (value HTML) Bytes() []byte Returns a copy of the content represented as bytes.
Declaration:
type Email struct {
// contiene campos internos
} Email defines a public type of API.
NewEmail
Declaration:
func NewEmail(address string) (Email, error) Build NewEmail.
Parameters
| Parameter | Type | Description |
|---|---|---|
address | string | Type value string required by the operation. |
Returns
| Return | Type | Description |
|---|---|---|
value | Email | Type value Email produced by the operation. |
err | error | nil if the operation ends correctly; otherwise, the error produced. |
Behavior
The operation returns an error when it cannot complete the above contract.
Errors
NewEmail returns an error when the arguments, the status of the receiver or the underlying operation make it impossible to complete the call.
Usage syntax
value, err := gox.NewEmail("[email protected]") Email.Address
Declaration:
func (e Email) Address() string Add Address.
Returns
| Return | Type | Description |
|---|---|---|
value | string | Textual value produced by the operation; its zero value is an empty string. |
Usage syntax
value := email.Address() Email.Username
Declaration:
func (e Email) Username() string Returns the local part of the address.
Returns
| Return | Type | Description |
|---|---|---|
value | string | Textual value produced by the operation; its zero value is an empty string. |
Usage syntax
value := email.Username() Email.Domain
Declaration:
func (e Email) Domain() string Returns the address domain.
Returns
| Return | Type | Description |
|---|---|---|
value | string | Textual value produced by the operation; its zero value is an empty string. |
Usage syntax
value := email.Domain() Email.String
Declaration:
func (e Email) String() string Returns the full textual representation.
Returns
| Return | Type | Description |
|---|---|---|
value | string | Textual value produced by the operation; its zero value is an empty string. |
Usage syntax
value := email.String() Email.IsZero
Declaration:
func (e Email) IsZero() bool Indicates the state of IsZero.
Returns
| Return | Type | Description |
|---|---|---|
value | bool | It indicates the result of the check. |
Behavior
It does not open or consume the content.
Usage syntax
value := email.IsZero() Email.CheckMX
Declaration:
func (e Email) CheckMX(ctx context.Context) (bool, error) Check if the domain publishes MX records.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | context.Context | Context of execution. |
Returns
| Return | Type | Description |
|---|---|---|
value | bool | It indicates the result of the check. |
err | error | nil if the operation ends correctly; otherwise, the error produced. |
Behavior
The operation returns an error when it cannot complete the above contract.
Errors
CheckMX returns an error when the arguments, the status of the receiver or the underlying operation make it impossible to complete the call.
Usage syntax
value, err := email.CheckMX(ctx) Writer
Declaration:
type Writer interface {
io.Writer
WriteTextString(value string)
WriteRawString(value string)
WriteTextBytes(value []byte)
WriteRawBytes(value []byte)
WriteBytes(value []byte)
WriteByte(value byte)
WriteStream(value io.Reader)
WriteError(value error)
WriteTextBool(value bool)
WriteRawBool(value bool)
WriteTextInt(value int)
WriteRawInt(value int)
WriteTextInt8(value int8)
WriteRawInt8(value int8)
WriteTextInt16(value int16)
WriteRawInt16(value int16)
WriteTextInt32(value int32)
WriteRawInt32(value int32)
WriteTextInt64(value int64)
WriteRawInt64(value int64)
WriteTextUint(value uint)
WriteRawUint(value uint)
WriteTextUint8(value uint8)
WriteRawUint8(value uint8)
WriteTextUint16(value uint16)
WriteRawUint16(value uint16)
WriteTextUint32(value uint32)
WriteRawUint32(value uint32)
WriteTextUint64(value uint64)
WriteRawUint64(value uint64)
WriteTextUintptr(value uintptr)
WriteRawUintptr(value uintptr)
WriteTextFloat32(value float32)
WriteRawFloat32(value float32)
WriteTextFloat64(value float64)
WriteRawFloat64(value float64)
WriteTextBigInt(value *big.Int)
WriteRawBigInt(value *big.Int)
WriteTextBigIntValue(value big.Int)
WriteRawBigIntValue(value big.Int)
WriteTextBigFloat(value *big.Float)
WriteRawBigFloat(value *big.Float)
WriteTextBigFloatValue(value big.Float)
WriteRawBigFloatValue(value big.Float)
WriteTextBigRat(value *big.Rat)
WriteRawBigRat(value *big.Rat)
WriteTextBigRatValue(value big.Rat)
WriteRawBigRatValue(value big.Rat)
WriteTextAny(value any)
WriteRawAny(value any)
WriteSpreadAttrs(attrs map[string]string)
} Write Writer.