Skip to content

Commit 98d81d6

Browse files
committed
go.mod update
1 parent 53d65b3 commit 98d81d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+176604
-53940
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/

LICENSE

+21-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
Copyright (c) 2017, James Cote and Liberty Fund, Inc.
1+
Copyright (c) 2019, James Cote
22
All rights reserved.
33

4-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
56

6-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
1. Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
79

8-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10+
2. Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
913

10-
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
14+
3. Neither the name of the copyright holder nor the names of its contributors may
15+
be used to endorse or promote products derived from this software without
16+
specific prior written permission.
1117

12-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27+
OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# DocuSign eSignature RestApi v2 for Go
2+
3+
esign provides Go packages for interacting with DocuSign's eSignature RestApi and
4+
has been created using the lastest published swagger definition.
5+
6+
The package requires Go 1.7 or above and has been tested with Go 1.9-1.12.
7+
8+
The previous package github.com/jfcote87/docusign is now deprecated.
9+
10+
## Resources
11+
12+
Official documentation: [https://developers.docusign.com/](https://developers.docusign.com/)
13+
14+
## Package Updates
15+
16+
All packages, excepte for gen-esign and legacy, are generated from DocuSign's [OpenAPI(swagger) specification](https://github.com/docusign/eSign-OpenAPI-Specification) using the gen-esign package.
17+
18+
Corrections to field names and definitions are documented in gen-esign/overrides/overrides.go.
19+
20+
The package names correspond to the API categories listed on the
21+
[DocuSign REST API Reference](https://developers.docusign.com/esign-rest-api/reference) page.
22+
Each operation contains an SDK Method which corresponds to the package operation which you will
23+
find in operation definition.
24+
25+
## Authentication
26+
27+
Authentication is handled by the esign.Credential interface. OAuth2Credentials may be created
28+
via the OAuth2Config struct for 3-legged oauth and the JWTConfig struct for 2-legged oauth. Examples
29+
are shown for each in the esign examples.
30+
31+
UserID/Password login is available via the legacy.Config which may also be used to create non-expiring
32+
oauth tokens (legacy.OauthCredential). Examples are shown in the legacy package.
33+
34+
## Models
35+
36+
The model package describes the structure of all data passed to and received from API calls.
37+
38+
## Operations
39+
40+
Each package has a service object which is initialized via the <packagename>.New(<credential>) call.
41+
The service methods define all operations for the package with corresponding options. An operation is
42+
executed via a Do(context.Context) function. A context must be passwed for all operation
43+
44+
## Example
45+
46+
Create envelope
47+
48+
```go
49+
sv := envelopes.New(credential)
50+
51+
f1, err := ioutil.ReadFile("letter.pdf")
52+
if err != nil {
53+
return nil, err
54+
}
55+
f2, err := ioutil.ReadFile("contract.pdf")
56+
if err != nil {
57+
return nil, err
58+
}
59+
60+
env := &model.EnvelopeDefinition{
61+
EmailSubject: "[Go eSignagure SDK] - Please sign this doc",
62+
EmailBlurb: "Please sign this test document",
63+
Status: "sent",
64+
Documents: []model.Document{
65+
{
66+
DocumentBase64: f1,
67+
Name: "invite letter.pdf",
68+
DocumentID: "1",
69+
},
70+
{
71+
DocumentBase64: f2,
72+
Name: "contract.pdf",
73+
DocumentID: "2",
74+
},
75+
},
76+
Recipients: &model.Recipients{
77+
Signers: []model.Signer{
78+
{
79+
Email: email,
80+
EmailNotification: nil,
81+
Name: name,
82+
RecipientID: "1",
83+
Tabs: &model.Tabs{
84+
SignHereTabs: []model.SignHere{
85+
{
86+
TabBase: model.TabBase{
87+
DocumentID: "1",
88+
RecipientID: "1",
89+
},
90+
TabPosition: model.TabPosition{
91+
PageNumber: "1",
92+
TabLabel: "signature",
93+
XPosition: "192",
94+
YPosition: "160",
95+
},
96+
},
97+
},
98+
DateSignedTabs: []model.DateSigned{
99+
{
100+
TabBase: model.TabBase{
101+
DocumentID: "1",
102+
RecipientID: "1",
103+
},
104+
TabPosition: model.TabPosition{
105+
PageNumber: "1",
106+
TabLabel: "dateSigned",
107+
XPosition: "334",
108+
YPosition: "179",
109+
},
110+
},
111+
},
112+
TextTabs: []model.Text{
113+
{
114+
TabBase: model.TabBase{
115+
DocumentID: "2",
116+
RecipientID: "1",
117+
},
118+
TabPosition: model.TabPosition{
119+
PageNumber: "1",
120+
TabLabel: "txtNote",
121+
XPosition: "70",
122+
YPosition: "564",
123+
},
124+
TabStyle: model.TabStyle{
125+
Name: "This is the tab tooltip",
126+
},
127+
Width: 300,
128+
Height: 150,
129+
},
130+
},
131+
},
132+
},
133+
},
134+
},
135+
}
136+
envSummary, err := sv.Create(env).Do(context.Background())
137+
```

0 commit comments

Comments
 (0)