Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ coverage.txt
sendgrid.env
.vscode
prism*
.idea
vendor
profile.out
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/helpers/mail"
"github.com/sendgrid/sendgrid-go/v3"
"github.com/sendgrid/sendgrid-go/v3/helpers/mail"
)

func main() {
Expand Down Expand Up @@ -129,7 +129,7 @@ package main

import (
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
"log"
"os"
)
Expand Down Expand Up @@ -176,7 +176,7 @@ package main

import (
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
"log"
"os"
)
Expand Down
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main

import (
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
"log"
"os"
)
Expand Down
3 changes: 2 additions & 1 deletion base_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
"time"

"github.com/sendgrid/rest"
"github.com/sendgrid/sendgrid-go/helpers/mail"

"github.com/sendgrid/sendgrid-go/v3/helpers/mail"
)

// Version is this client library's current version
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"os"
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
"log"
)

Expand Down
2 changes: 1 addition & 1 deletion docker/examples/apikey/apikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
"log"
"os"
)
Expand Down
2 changes: 1 addition & 1 deletion docker/examples/mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// SendSampleHelloMail demonstrates how to send a sample e-mail with a subject line
Expand Down
2 changes: 1 addition & 1 deletion docker/examples/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
"log"
"os"
)
Expand Down
2 changes: 1 addition & 1 deletion docker/get-version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/accesssettings/accesssettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

sendgrid "github.com/sendgrid/sendgrid-go"
sendgrid "github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveallrecentaccessattempts : Retrieve all recent access attempts
Expand Down
2 changes: 1 addition & 1 deletion examples/alerts/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// CreateanewAlert : Create a new Alert
Expand Down
2 changes: 1 addition & 1 deletion examples/apikeys/apikeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

sendgrid "github.com/sendgrid/sendgrid-go"
sendgrid "github.com/sendgrid/sendgrid-go/v3"
)

// CreateAPIkeys : Create API keys
Expand Down
2 changes: 1 addition & 1 deletion examples/asm/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Createanewsuppressiongroup : Create a new suppression group
Expand Down
2 changes: 1 addition & 1 deletion examples/browsers/browsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

sendgrid "github.com/sendgrid/sendgrid-go"
sendgrid "github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveemailstatisticsbybrowser : Retrieve email statistics by browser.
Expand Down
2 changes: 1 addition & 1 deletion examples/campaigns/campaigns.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

sendgrid "github.com/sendgrid/sendgrid-go"
sendgrid "github.com/sendgrid/sendgrid-go/v3"
)

// CreateaCampaign : Create a Campaign
Expand Down
2 changes: 1 addition & 1 deletion examples/categories/categories.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveallcategories : Retrieve all categories
Expand Down
2 changes: 1 addition & 1 deletion examples/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveemailstatisticsbyclienttype : Retrieve email statistics by client type.
Expand Down
2 changes: 1 addition & 1 deletion examples/contactdb/contactdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// CreateaCustomField : Create a Custom Field
Expand Down
2 changes: 1 addition & 1 deletion examples/devices/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveemailstatisticsbydevicetype : Retrieve email statistics by device type.
Expand Down
5 changes: 3 additions & 2 deletions examples/eventwebhook/eventwebhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"os"

"github.com/sendgrid/rest"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/helpers/eventwebhook"

"github.com/sendgrid/sendgrid-go/v3"
"github.com/sendgrid/sendgrid-go/v3/helpers/eventwebhook"
)

// EnableSignedWebhook : Enables Signed Event Webhook.
Expand Down
2 changes: 1 addition & 1 deletion examples/geo/geo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveemailstatisticsbycountryandstateprovince : Retrieve email statistics by country and state/province.
Expand Down
4 changes: 2 additions & 2 deletions examples/helpers/mail/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/helpers/mail"
"github.com/sendgrid/sendgrid-go/v3"
"github.com/sendgrid/sendgrid-go/v3/helpers/mail"
)

// Minimum required to send an email
Expand Down
2 changes: 1 addition & 1 deletion examples/ips/ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// RetrieveallIPaddresses : Retrieve all IP addresses
Expand Down
2 changes: 1 addition & 1 deletion examples/mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// CreateabatchID : Create a batch ID
Expand Down
2 changes: 1 addition & 1 deletion examples/mailboxproviders/mailboxproviders.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveemailstatisticsbymailboxprovider : Retrieve email statistics by mailbox provider.
Expand Down
2 changes: 1 addition & 1 deletion examples/mailsettings/mailsettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveallmailsettings : Retrieve all mail settings
Expand Down
2 changes: 1 addition & 1 deletion examples/partnersettings/partnersettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Returnsalistofallpartnersettings : Returns a list of all partner settings.
Expand Down
2 changes: 1 addition & 1 deletion examples/scopes/scopes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrievealistofscopesforwhichthisuserhasaccess : Retrieve a list of scopes for which this user has access.
Expand Down
2 changes: 1 addition & 1 deletion examples/senders/senders.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// CreateaSenderIdentity : Create a Sender Identity
Expand Down
2 changes: 1 addition & 1 deletion examples/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveglobalemailstatistics : Retrieve global email statistics
Expand Down
2 changes: 1 addition & 1 deletion examples/subusers/subusers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// CreateSubuser : Creates a Subuser
Expand Down
2 changes: 1 addition & 1 deletion examples/suppression/suppression.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Retrieveallblocks : Retrieve all blocks
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

sendgrid "github.com/sendgrid/sendgrid-go"
sendgrid "github.com/sendgrid/sendgrid-go/v3"
)

// Createatransactionaltemplate : Create a transactional template.
Expand Down
2 changes: 1 addition & 1 deletion examples/trackingsettings/trackingsettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// RetrieveTrackingSettings : Retrieve Tracking Settings
Expand Down
2 changes: 1 addition & 1 deletion examples/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Getausersaccountinformation : Get a user's account information.
Expand Down
2 changes: 1 addition & 1 deletion examples/whitelabel/whitelabel.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/v3"
)

// Createadomainwhitelabel : Create a domain whitelabel.
Expand Down
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/sendgrid/sendgrid-go/v3

go 1.13

require (
github.com/sendgrid/rest v2.4.1+incompatible
github.com/sendgrid/sendgrid-go v3.5.0+incompatible // indirect
github.com/stretchr/testify v1.6.0
)
16 changes: 16 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sendgrid/rest v1.0.2 h1:xdfALkR1m9eqf41/zEnUmV0fw4b31ZzGZ4Dj5f2/w04=
github.com/sendgrid/rest v2.4.1+incompatible h1:HDib/5xzQREPq34lN3YMhQtMkdXxS/qLp5G3k9a5++4=
github.com/sendgrid/rest v2.4.1+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE=
github.com/sendgrid/sendgrid-go v1.2.0 h1:2K3teZdhaPe12ftFyFL4AWDH4QmNPc+sCi6mWFx5+oo=
github.com/sendgrid/sendgrid-go v3.5.0+incompatible h1:kosbgHyNVYVaqECDYvFVLVD9nvThweBd6xp7vaCT3GI=
github.com/sendgrid/sendgrid-go v3.5.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho=
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion helpers/inbound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"log"
"net/http"

"github.com/sendgrid/sendgrid-go/helpers/inbound"
"github.com/sendgrid/sendgrid-go/v3/helpers/inbound"
)

func inboundHandler(response http.ResponseWriter, request *http.Request) {
Expand Down
Loading