export SigOptions
This commit is contained in:
8
dkim.go
8
dkim.go
@@ -38,7 +38,7 @@ const (
|
||||
)
|
||||
|
||||
// sigOptions represents signing options
|
||||
type sigOptions struct {
|
||||
type SigOptions struct {
|
||||
|
||||
// DKIM version (default 1)
|
||||
Version uint
|
||||
@@ -84,8 +84,8 @@ type sigOptions struct {
|
||||
}
|
||||
|
||||
// NewSigOption returns new sigoption with some defaults value
|
||||
func NewSigOptions() sigOptions {
|
||||
return sigOptions{
|
||||
func NewSigOptions() SigOptions {
|
||||
return SigOptions{
|
||||
Version: 1,
|
||||
Canonicalization: "simple/simple",
|
||||
Algo: "rsa-sha256",
|
||||
@@ -98,7 +98,7 @@ func NewSigOptions() sigOptions {
|
||||
}
|
||||
|
||||
// Sign signs an email
|
||||
func Sign(email *[]byte, options sigOptions) error {
|
||||
func Sign(email *[]byte, options SigOptions) error {
|
||||
var privateKey *rsa.PrivateKey
|
||||
|
||||
// PrivateKey
|
||||
|
||||
@@ -197,7 +197,7 @@ type dkimHeader struct {
|
||||
}
|
||||
|
||||
// NewDkimHeaderBySigOptions return a new DkimHeader initioalized with sigOptions value
|
||||
func newDkimHeaderBySigOptions(options sigOptions) *dkimHeader {
|
||||
func newDkimHeaderBySigOptions(options SigOptions) *dkimHeader {
|
||||
h := new(dkimHeader)
|
||||
h.Version = "1"
|
||||
h.Algorithm = options.Algo
|
||||
|
||||
Reference in New Issue
Block a user