Documentation
¶
Index ¶
- Constants
- type AccountManagement
- type Client
- func (c *Client) CreateUsers(ctx context.Context, request CreateUsersRequest) (*UserCreationResponse, annotations.Annotations, error)
- func (c *Client) GetGroupUsers(ctx context.Context, groupId string, options PageOptions) ([]User, string, annotations.Annotations, error)
- func (c *Client) GetGroups(ctx context.Context, options PageOptions) ([]Group, string, annotations.Annotations, error)
- func (c *Client) GetUserDetails(ctx context.Context, userID string) (*UserDetail, annotations.Annotations, error)
- func (c *Client) GetUsers(ctx context.Context, options PageOptions) ([]User, string, annotations.Annotations, error)
- type CreateUsersRequest
- type EmailNotifications
- type Group
- type GroupsResponse
- type NewUser
- type OAuth2Docusign
- type Page
- type PageOptions
- type TokenResponse
- type User
- type UserCreationResponse
- type UserDetail
- type UserSettings
- type UsersResponse
Constants ¶
const DefaultPageSize = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountManagement ¶
type AccountManagement struct {
CanManageUsers string `json:"canManageUsers"`
CanManageAdmins string `json:"canManageAdmins"`
CanManageAccountSettings string `json:"canManageAccountSettings"`
CanManageReporting string `json:"canManageReporting"`
CanManageAccountSecuritySettings string `json:"canManageAccountSecuritySettings"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps HTTP interactions with the DocuSign API, handling auth and base URL.
func New ¶
func New(ctx context.Context, apiUrl, accountId, clientID, clientSecret, redirectURI, refreshToken string) (*Client, error)
New constructs a Client, choosing OAuth2 interactive flow or direct token based on accessToken.
func NewClient ¶
func NewClient(ctx context.Context, apiUrl, accountId string, tokenSource oauth2.TokenSource, httpClient ...*uhttp.BaseHttpClient) *Client
NewClient initializes a Client with a fixed token and optional HTTP wrapper.
func (*Client) CreateUsers ¶
func (c *Client) CreateUsers(ctx context.Context, request CreateUsersRequest) (*UserCreationResponse, annotations.Annotations, error)
CreateUsers sends a bulk create request for new users in the account.
func (*Client) GetGroupUsers ¶
func (c *Client) GetGroupUsers(ctx context.Context, groupId string, options PageOptions) ([]User, string, annotations.Annotations, error)
GetGroupUsers fetches users for a group with pagination support.
func (*Client) GetGroups ¶
func (c *Client) GetGroups(ctx context.Context, options PageOptions) ([]Group, string, annotations.Annotations, error)
GetGroups fetches a page of groups and handles pagination and rate limit annotations.
func (*Client) GetUserDetails ¶
func (c *Client) GetUserDetails(ctx context.Context, userID string) (*UserDetail, annotations.Annotations, error)
GetUserDetails fetches detailed information for a specific user, including permissions.
func (*Client) GetUsers ¶
func (c *Client) GetUsers(ctx context.Context, options PageOptions) ([]User, string, annotations.Annotations, error)
GetUsers fetches a page of users and returns users, next page token, and annotations.
type CreateUsersRequest ¶
type CreateUsersRequest struct {
NewUsers []NewUser `json:"newUsers"`
}
type EmailNotifications ¶
type GroupsResponse ¶
type NewUser ¶
type NewUser struct {
UserName string `json:"userName"`
Email string `json:"email"`
UserSettings *UserSettings `json:"userSettings,omitempty"`
}
type OAuth2Docusign ¶
type OAuth2Docusign struct {
// contains filtered or unexported fields
}
OAuth2Docusign manages the OAuth2 configuration and token lifecycle for DocuSign.
func NewOAuth2Docusign ¶
func NewOAuth2Docusign(clientID, clientSecret, redirectURI string) *OAuth2Docusign
NewOAuth2Docusign initializes a new OAuth2Docusign helper with client credentials.
type PageOptions ¶
type TokenResponse ¶
type UserCreationResponse ¶
type UserCreationResponse struct {
NewUsers []struct {
UserId string `json:"userId"`
URI string `json:"uri"`
Email string `json:"email"`
UserName string `json:"userName"`
UserStatus string `json:"userStatus"`
CreatedDateTime string `json:"createdDateTime"`
MembershipId string `json:"membershipId"`
ErrorDetails *struct {
ErrorCode string `json:"errorCode"`
Message string `json:"message"`
} `json:"errorDetails,omitempty"`
} `json:"newUsers"`
}
type UserDetail ¶
type UserDetail struct {
UserID string `json:"userId"`
UserName string `json:"userName"`
Email string `json:"email"`
IsAdmin string `json:"isAdmin"`
UserStatus string `json:"userStatus"`
PermissionProfileName string `json:"permissionProfileName"`
UserSettings UserSettings `json:"userSettings"`
GroupList []Group `json:"groupList"`
}
type UserSettings ¶
type UserSettings struct {
CanManageAccount string `json:"canManageAccount"`
AccountManagementGranular AccountManagement `json:"accountManagementGranular"`
CanSendEnvelope string `json:"canSendEnvelope"`
CanSignEnvelope string `json:"canSignEnvelope"`
AllowSendOnBehalfOf string `json:"allowSendOnBehalfOf"`
BulkSend string `json:"bulkSend"`
CanSendAPIRequests string `json:"canSendAPIRequests"`
EnableSequentialSigningUI string `json:"enableSequentialSigningUI"`
EnableDSPro string `json:"enableDSPro"`
CanUseScratchpad string `json:"canUseScratchpad"`
CanCreateWorkspaces string `json:"canCreateWorkspaces"`
EnableTransactionPoint string `json:"enableTransactionPoint"`
PowerFormMode string `json:"powerFormMode"`
APICanExportAC string `json:"apiCanExportAC"`
EnableVaulting string `json:"enableVaulting"`
CanManageTemplates string `json:"canManageTemplates"`
AdminOnly string `json:"adminOnly"`
CanManageDistributor string `json:"canManageDistributor"`
CanManageOrganization string `json:"canManageOrganization"`
CanUseSmartContracts string `json:"canUseSmartContracts"`
SignerEmailNotifications EmailNotifications `json:"signerEmailNotifications"`
SenderEmailNotifications EmailNotifications `json:"senderEmailNotifications"`
}