modstd

package
v0.0.0-...-4d5b1ca Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSmtp

func NewSmtp(aser module.MASer) *modSMTP

func NewWeb

func NewWeb(aser module.MASer) *modWeb

Types

type SmtpAttach

type SmtpAttach struct {
	Name    string `json:"name"`
	Type    string `json:"type"` // MIME-type
	Content string `json:"content"`
}

type SmtpMsg

type SmtpMsg struct {
	To       string              `json:"to"`
	ToName   string              `json:"to_name"`
	From     string              `json:"from"`
	FromName string              `json:"from_name"`
	ReplyTo  string              `json:"reply_to"`
	Subject  string              `json:"subject"`
	Text     string              `json:"text"`
	Html     string              `json:"html"`
	Header   map[string][]string `json:"header"`
	Attach   []SmtpAttach        `json:"attach"`
}

type SmtpResult

type SmtpResult struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type SmtpServer

type SmtpServer struct {
	Hostname string `json:"hostname"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type TLSCert

type TLSCert struct {
	Signature             []byte     `json:"signature"`
	SignatureAlgorithm    string     `json:"signature_alg"`
	PublicKeyAlgorithm    string     `json:"signature_alg"`
	Version               int        `json:"version"`
	SerialNumber          string     `json:"serial_number"`
	Issuer                pkix.Name  `json:"issuer"`
	Subject               pkix.Name  `json:"subject"`
	NotBefore             int64      `json:"not_before"` // converted to js units
	NotAfter              int64      `json:"not_after"`  // converted to js units
	KeyUsage              int32      `json:"key_usage"`
	SubjectKeyId          []byte     `json:"subject_key_id"`
	AuthorityKeyId        []byte     `json:"authority_key_id"`
	DNSNames              []string   `json:"dns_names"`
	EmailAddresses        []string   `json:"email_addresses"`
	IPAddresses           []net.IP   `json:"ip_addresses"`
	URIs                  []*url.URL `json:"uris"`
	CRLDistributionPoints []string   `json:"crl_distribution_points"`
}

type TLSResult

type TLSResult struct {
	Version            uint16 `json:"version"`
	CipherSuite        uint16 `json:"cipher_suite"`
	NegotiatedProtocol string `json:"negotiated_protocol"`
	ServerName         string `json:"server_name"`
	Certs              int    `json:"n_certs"`
}

QQQ - provide more / less?

type WebResult

type WebResult struct {
	Code    int                 `json:"code"`
	Message string              `json:"message"`
	Body    string              `json:"body"`
	Header  map[string][]string `json:"header"`
	// contains filtered or unexported fields
}

returned to user

func (*WebResult) Cert

func (wr *WebResult) Cert(n int) *TLSCert

get the tls cert details from the result

func (*WebResult) Tls

func (wr *WebResult) Tls() *TLSResult

get the tls details from the result

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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