Documentation ¶
Index ¶
- Constants
- Variables
- type AuthenticateArgs
- type AuthenticateLongSessionArgs
- type AuthenticateLongSessionResult
- type AuthenticateResult
- type AuthenticateToBusinessArgs
- type AuthenticateToBusinessResult
- type AuthenticationResult
- func (p *AuthenticationResult) IsSetNoteStoreUrl() bool
- func (p *AuthenticationResult) IsSetPublicUserInfo() bool
- func (p *AuthenticationResult) IsSetSecondFactorDeliveryHint() bool
- func (p *AuthenticationResult) IsSetSecondFactorRequired() bool
- func (p *AuthenticationResult) IsSetUser() bool
- func (p *AuthenticationResult) IsSetWebApiUrlPrefix() bool
- func (p *AuthenticationResult) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *AuthenticationResult) String() string
- func (p *AuthenticationResult) Write(ctx context.Context, oprot thrift.TProtocol) error
- type BootstrapInfo
- type BootstrapProfile
- type BootstrapSettings
- func (p *BootstrapSettings) IsSetEnableFacebookSharing() bool
- func (p *BootstrapSettings) IsSetEnableGiftSubscriptions() bool
- func (p *BootstrapSettings) IsSetEnableLinkedInSharing() bool
- func (p *BootstrapSettings) IsSetEnablePublicNotebooks() bool
- func (p *BootstrapSettings) IsSetEnableSharedNotebooks() bool
- func (p *BootstrapSettings) IsSetEnableSingleNoteSharing() bool
- func (p *BootstrapSettings) IsSetEnableSponsoredAccounts() bool
- func (p *BootstrapSettings) IsSetEnableSupportTickets() bool
- func (p *BootstrapSettings) IsSetEnableTwitterSharing() bool
- func (p *BootstrapSettings) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *BootstrapSettings) String() string
- func (p *BootstrapSettings) Write(ctx context.Context, oprot thrift.TProtocol) error
- type CheckVersionArgs
- type CheckVersionResult
- type CompleteTwoFactorAuthenticationArgs
- type CompleteTwoFactorAuthenticationResult
- type GetBootstrapInfoArgs
- type GetBootstrapInfoResult
- type GetNoteStoreUrlArgs
- type GetNoteStoreUrlResult
- type GetPremiumInfoArgs
- type GetPremiumInfoResult
- type GetPublicUserInfoArgs
- type GetPublicUserInfoResult
- type GetUserArgs
- type GetUserResult
- type PublicUserInfo
- func (p *PublicUserInfo) IsSetNoteStoreUrl() bool
- func (p *PublicUserInfo) IsSetPrivilege() bool
- func (p *PublicUserInfo) IsSetUsername() bool
- func (p *PublicUserInfo) IsSetWebApiUrlPrefix() bool
- func (p *PublicUserInfo) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *PublicUserInfo) String() string
- func (p *PublicUserInfo) Write(ctx context.Context, oprot thrift.TProtocol) error
- type RefreshAuthenticationArgs
- type RefreshAuthenticationResult
- type RevokeLongSessionArgs
- type RevokeLongSessionResult
- type UserStore
- type UserStoreClient
- func (p *UserStoreClient) Authenticate(ctx context.Context, username string, password string, consumerKey string, ...) (r *AuthenticationResult, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) AuthenticateLongSession(ctx context.Context, username string, password string, consumerKey string, ...) (r *AuthenticationResult, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) AuthenticateToBusiness(ctx context.Context, authenticationToken string) (r *AuthenticationResult, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) CheckVersion(ctx context.Context, clientName string, edamVersionMajor int16, ...) (r bool, err error)
- func (p *UserStoreClient) CompleteTwoFactorAuthentication(ctx context.Context, authenticationToken string, oneTimeCode string, ...) (r *AuthenticationResult, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) GetBootstrapInfo(ctx context.Context, locale string) (r *BootstrapInfo, err error)
- func (p *UserStoreClient) GetNoteStoreUrl(ctx context.Context, authenticationToken string) (r string, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) GetPremiumInfo(ctx context.Context, authenticationToken string) (r *Types.PremiumInfo, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) GetPublicUserInfo(ctx context.Context, username string) (r *PublicUserInfo, notFoundException *Errors.EDAMNotFoundException, ...)
- func (p *UserStoreClient) GetUser(ctx context.Context, authenticationToken string) (r *Types.User, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) RefreshAuthentication(ctx context.Context, authenticationToken string) (r *AuthenticationResult, userException *Errors.EDAMUserException, ...)
- func (p *UserStoreClient) RevokeLongSession(ctx context.Context, authenticationToken string) (userException *Errors.EDAMUserException, ...)
- type UserStoreProcessor
- func (p *UserStoreProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *UserStoreProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *UserStoreProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, exp thrift.TException)
- func (p *UserStoreProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
Constants ¶
const EDAM_VERSION_MAJOR = 1
const EDAM_VERSION_MINOR = 25
Variables ¶
var GoUnusedProtection__ int
Functions ¶
This section is empty.
Types ¶
type AuthenticateArgs ¶
type AuthenticateArgs struct { Username string `thrift:"username,1"` Password string `thrift:"password,2"` ConsumerKey string `thrift:"consumerKey,3"` ConsumerSecret string `thrift:"consumerSecret,4"` SupportsTwoFactor bool `thrift:"supportsTwoFactor,5"` }
func NewAuthenticateArgs ¶
func NewAuthenticateArgs() *AuthenticateArgs
func (*AuthenticateArgs) String ¶
func (p *AuthenticateArgs) String() string
type AuthenticateLongSessionArgs ¶
type AuthenticateLongSessionArgs struct { Username string `thrift:"username,1"` Password string `thrift:"password,2"` ConsumerKey string `thrift:"consumerKey,3"` ConsumerSecret string `thrift:"consumerSecret,4"` DeviceIdentifier string `thrift:"deviceIdentifier,5"` DeviceDescription string `thrift:"deviceDescription,6"` SupportsTwoFactor bool `thrift:"supportsTwoFactor,7"` }
func NewAuthenticateLongSessionArgs ¶
func NewAuthenticateLongSessionArgs() *AuthenticateLongSessionArgs
func (*AuthenticateLongSessionArgs) String ¶
func (p *AuthenticateLongSessionArgs) String() string
type AuthenticateLongSessionResult ¶
type AuthenticateLongSessionResult struct { Success *AuthenticationResult `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewAuthenticateLongSessionResult ¶
func NewAuthenticateLongSessionResult() *AuthenticateLongSessionResult
func (*AuthenticateLongSessionResult) String ¶
func (p *AuthenticateLongSessionResult) String() string
type AuthenticateResult ¶
type AuthenticateResult struct { Success *AuthenticationResult `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewAuthenticateResult ¶
func NewAuthenticateResult() *AuthenticateResult
func (*AuthenticateResult) String ¶
func (p *AuthenticateResult) String() string
type AuthenticateToBusinessArgs ¶
type AuthenticateToBusinessArgs struct {
AuthenticationToken string `thrift:"authenticationToken,1"`
}
func NewAuthenticateToBusinessArgs ¶
func NewAuthenticateToBusinessArgs() *AuthenticateToBusinessArgs
func (*AuthenticateToBusinessArgs) String ¶
func (p *AuthenticateToBusinessArgs) String() string
type AuthenticateToBusinessResult ¶
type AuthenticateToBusinessResult struct { Success *AuthenticationResult `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewAuthenticateToBusinessResult ¶
func NewAuthenticateToBusinessResult() *AuthenticateToBusinessResult
func (*AuthenticateToBusinessResult) String ¶
func (p *AuthenticateToBusinessResult) String() string
type AuthenticationResult ¶
type AuthenticationResult struct { CurrentTime Types.Timestamp `thrift:"currentTime,1,required"` AuthenticationToken string `thrift:"authenticationToken,2,required"` Expiration Types.Timestamp `thrift:"expiration,3,required"` User *Types.User `thrift:"user,4"` PublicUserInfo *PublicUserInfo `thrift:"publicUserInfo,5"` NoteStoreUrl string `thrift:"noteStoreUrl,6"` WebApiUrlPrefix string `thrift:"webApiUrlPrefix,7"` SecondFactorRequired bool `thrift:"secondFactorRequired,8"` SecondFactorDeliveryHint string `thrift:"secondFactorDeliveryHint,9"` }
func NewAuthenticationResult ¶
func NewAuthenticationResult() *AuthenticationResult
func (*AuthenticationResult) IsSetNoteStoreUrl ¶
func (p *AuthenticationResult) IsSetNoteStoreUrl() bool
func (*AuthenticationResult) IsSetPublicUserInfo ¶
func (p *AuthenticationResult) IsSetPublicUserInfo() bool
func (*AuthenticationResult) IsSetSecondFactorDeliveryHint ¶
func (p *AuthenticationResult) IsSetSecondFactorDeliveryHint() bool
func (*AuthenticationResult) IsSetSecondFactorRequired ¶
func (p *AuthenticationResult) IsSetSecondFactorRequired() bool
func (*AuthenticationResult) IsSetUser ¶
func (p *AuthenticationResult) IsSetUser() bool
func (*AuthenticationResult) IsSetWebApiUrlPrefix ¶
func (p *AuthenticationResult) IsSetWebApiUrlPrefix() bool
func (*AuthenticationResult) String ¶
func (p *AuthenticationResult) String() string
type BootstrapInfo ¶
type BootstrapInfo struct {
Profiles []*BootstrapProfile `thrift:"profiles,1,required"`
}
func NewBootstrapInfo ¶
func NewBootstrapInfo() *BootstrapInfo
func (*BootstrapInfo) String ¶
func (p *BootstrapInfo) String() string
type BootstrapProfile ¶
type BootstrapProfile struct { Name string `thrift:"name,1,required"` Settings *BootstrapSettings `thrift:"settings,2,required"` }
func NewBootstrapProfile ¶
func NewBootstrapProfile() *BootstrapProfile
func (*BootstrapProfile) String ¶
func (p *BootstrapProfile) String() string
type BootstrapSettings ¶
type BootstrapSettings struct { ServiceHost string `thrift:"serviceHost,1,required"` MarketingUrl string `thrift:"marketingUrl,2,required"` SupportUrl string `thrift:"supportUrl,3,required"` AccountEmailDomain string `thrift:"accountEmailDomain,4,required"` EnableFacebookSharing bool `thrift:"enableFacebookSharing,5"` EnableGiftSubscriptions bool `thrift:"enableGiftSubscriptions,6"` EnableSupportTickets bool `thrift:"enableSupportTickets,7"` EnableSingleNoteSharing bool `thrift:"enableSingleNoteSharing,9"` EnableSponsoredAccounts bool `thrift:"enableSponsoredAccounts,10"` EnableTwitterSharing bool `thrift:"enableTwitterSharing,11"` EnableLinkedInSharing bool `thrift:"enableLinkedInSharing,12"` EnablePublicNotebooks bool `thrift:"enablePublicNotebooks,13"` }
func NewBootstrapSettings ¶
func NewBootstrapSettings() *BootstrapSettings
func (*BootstrapSettings) IsSetEnableFacebookSharing ¶
func (p *BootstrapSettings) IsSetEnableFacebookSharing() bool
func (*BootstrapSettings) IsSetEnableGiftSubscriptions ¶
func (p *BootstrapSettings) IsSetEnableGiftSubscriptions() bool
func (*BootstrapSettings) IsSetEnableLinkedInSharing ¶
func (p *BootstrapSettings) IsSetEnableLinkedInSharing() bool
func (*BootstrapSettings) IsSetEnablePublicNotebooks ¶
func (p *BootstrapSettings) IsSetEnablePublicNotebooks() bool
func (*BootstrapSettings) IsSetEnableSharedNotebooks ¶
func (p *BootstrapSettings) IsSetEnableSharedNotebooks() bool
func (*BootstrapSettings) IsSetEnableSingleNoteSharing ¶
func (p *BootstrapSettings) IsSetEnableSingleNoteSharing() bool
func (*BootstrapSettings) IsSetEnableSponsoredAccounts ¶
func (p *BootstrapSettings) IsSetEnableSponsoredAccounts() bool
func (*BootstrapSettings) IsSetEnableSupportTickets ¶
func (p *BootstrapSettings) IsSetEnableSupportTickets() bool
func (*BootstrapSettings) IsSetEnableTwitterSharing ¶
func (p *BootstrapSettings) IsSetEnableTwitterSharing() bool
func (*BootstrapSettings) String ¶
func (p *BootstrapSettings) String() string
type CheckVersionArgs ¶
type CheckVersionArgs struct { ClientName string `thrift:"clientName,1"` EdamVersionMajor int16 `thrift:"edamVersionMajor,2"` EdamVersionMinor int16 `thrift:"edamVersionMinor,3"` }
func NewCheckVersionArgs ¶
func NewCheckVersionArgs() *CheckVersionArgs
func (*CheckVersionArgs) String ¶
func (p *CheckVersionArgs) String() string
type CheckVersionResult ¶
type CheckVersionResult struct {
Success bool `thrift:"success,0"`
}
func NewCheckVersionResult ¶
func NewCheckVersionResult() *CheckVersionResult
func (*CheckVersionResult) String ¶
func (p *CheckVersionResult) String() string
type CompleteTwoFactorAuthenticationArgs ¶
type CompleteTwoFactorAuthenticationArgs struct { AuthenticationToken string `thrift:"authenticationToken,1"` OneTimeCode string `thrift:"oneTimeCode,2"` DeviceIdentifier string `thrift:"deviceIdentifier,3"` DeviceDescription string `thrift:"deviceDescription,4"` }
func NewCompleteTwoFactorAuthenticationArgs ¶
func NewCompleteTwoFactorAuthenticationArgs() *CompleteTwoFactorAuthenticationArgs
func (*CompleteTwoFactorAuthenticationArgs) String ¶
func (p *CompleteTwoFactorAuthenticationArgs) String() string
type CompleteTwoFactorAuthenticationResult ¶
type CompleteTwoFactorAuthenticationResult struct { Success *AuthenticationResult `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewCompleteTwoFactorAuthenticationResult ¶
func NewCompleteTwoFactorAuthenticationResult() *CompleteTwoFactorAuthenticationResult
func (*CompleteTwoFactorAuthenticationResult) String ¶
func (p *CompleteTwoFactorAuthenticationResult) String() string
type GetBootstrapInfoArgs ¶
type GetBootstrapInfoArgs struct {
Locale string `thrift:"locale,1"`
}
func NewGetBootstrapInfoArgs ¶
func NewGetBootstrapInfoArgs() *GetBootstrapInfoArgs
func (*GetBootstrapInfoArgs) String ¶
func (p *GetBootstrapInfoArgs) String() string
type GetBootstrapInfoResult ¶
type GetBootstrapInfoResult struct {
Success *BootstrapInfo `thrift:"success,0"`
}
func NewGetBootstrapInfoResult ¶
func NewGetBootstrapInfoResult() *GetBootstrapInfoResult
func (*GetBootstrapInfoResult) String ¶
func (p *GetBootstrapInfoResult) String() string
type GetNoteStoreUrlArgs ¶
type GetNoteStoreUrlArgs struct {
AuthenticationToken string `thrift:"authenticationToken,1"`
}
func NewGetNoteStoreUrlArgs ¶
func NewGetNoteStoreUrlArgs() *GetNoteStoreUrlArgs
func (*GetNoteStoreUrlArgs) String ¶
func (p *GetNoteStoreUrlArgs) String() string
type GetNoteStoreUrlResult ¶
type GetNoteStoreUrlResult struct { Success string `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewGetNoteStoreUrlResult ¶
func NewGetNoteStoreUrlResult() *GetNoteStoreUrlResult
func (*GetNoteStoreUrlResult) String ¶
func (p *GetNoteStoreUrlResult) String() string
type GetPremiumInfoArgs ¶
type GetPremiumInfoArgs struct {
AuthenticationToken string `thrift:"authenticationToken,1"`
}
func NewGetPremiumInfoArgs ¶
func NewGetPremiumInfoArgs() *GetPremiumInfoArgs
func (*GetPremiumInfoArgs) String ¶
func (p *GetPremiumInfoArgs) String() string
type GetPremiumInfoResult ¶
type GetPremiumInfoResult struct { Success *Types.PremiumInfo `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewGetPremiumInfoResult ¶
func NewGetPremiumInfoResult() *GetPremiumInfoResult
func (*GetPremiumInfoResult) String ¶
func (p *GetPremiumInfoResult) String() string
type GetPublicUserInfoArgs ¶
type GetPublicUserInfoArgs struct {
Username string `thrift:"username,1"`
}
func NewGetPublicUserInfoArgs ¶
func NewGetPublicUserInfoArgs() *GetPublicUserInfoArgs
func (*GetPublicUserInfoArgs) String ¶
func (p *GetPublicUserInfoArgs) String() string
type GetPublicUserInfoResult ¶
type GetPublicUserInfoResult struct { Success *PublicUserInfo `thrift:"success,0"` NotFoundException *Errors.EDAMNotFoundException `thrift:"notFoundException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` UserException *Errors.EDAMUserException `thrift:"userException,3"` }
func NewGetPublicUserInfoResult ¶
func NewGetPublicUserInfoResult() *GetPublicUserInfoResult
func (*GetPublicUserInfoResult) String ¶
func (p *GetPublicUserInfoResult) String() string
type GetUserArgs ¶
type GetUserArgs struct {
AuthenticationToken string `thrift:"authenticationToken,1"`
}
func NewGetUserArgs ¶
func NewGetUserArgs() *GetUserArgs
func (*GetUserArgs) String ¶
func (p *GetUserArgs) String() string
type GetUserResult ¶
type GetUserResult struct { Success *Types.User `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewGetUserResult ¶
func NewGetUserResult() *GetUserResult
func (*GetUserResult) String ¶
func (p *GetUserResult) String() string
type PublicUserInfo ¶
type PublicUserInfo struct { UserId Types.UserID `thrift:"userId,1,required"` ShardId string `thrift:"shardId,2,required"` Privilege Types.PrivilegeLevel `thrift:"privilege,3"` Username string `thrift:"username,4"` NoteStoreUrl string `thrift:"noteStoreUrl,5"` WebApiUrlPrefix string `thrift:"webApiUrlPrefix,6"` }
func NewPublicUserInfo ¶
func NewPublicUserInfo() *PublicUserInfo
func (*PublicUserInfo) IsSetNoteStoreUrl ¶
func (p *PublicUserInfo) IsSetNoteStoreUrl() bool
func (*PublicUserInfo) IsSetPrivilege ¶
func (p *PublicUserInfo) IsSetPrivilege() bool
func (*PublicUserInfo) IsSetUsername ¶
func (p *PublicUserInfo) IsSetUsername() bool
func (*PublicUserInfo) IsSetWebApiUrlPrefix ¶
func (p *PublicUserInfo) IsSetWebApiUrlPrefix() bool
func (*PublicUserInfo) String ¶
func (p *PublicUserInfo) String() string
type RefreshAuthenticationArgs ¶
type RefreshAuthenticationArgs struct {
AuthenticationToken string `thrift:"authenticationToken,1"`
}
func NewRefreshAuthenticationArgs ¶
func NewRefreshAuthenticationArgs() *RefreshAuthenticationArgs
func (*RefreshAuthenticationArgs) String ¶
func (p *RefreshAuthenticationArgs) String() string
type RefreshAuthenticationResult ¶
type RefreshAuthenticationResult struct { Success *AuthenticationResult `thrift:"success,0"` UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewRefreshAuthenticationResult ¶
func NewRefreshAuthenticationResult() *RefreshAuthenticationResult
func (*RefreshAuthenticationResult) String ¶
func (p *RefreshAuthenticationResult) String() string
type RevokeLongSessionArgs ¶
type RevokeLongSessionArgs struct {
AuthenticationToken string `thrift:"authenticationToken,1"`
}
func NewRevokeLongSessionArgs ¶
func NewRevokeLongSessionArgs() *RevokeLongSessionArgs
func (*RevokeLongSessionArgs) String ¶
func (p *RevokeLongSessionArgs) String() string
type RevokeLongSessionResult ¶
type RevokeLongSessionResult struct { UserException *Errors.EDAMUserException `thrift:"userException,1"` SystemException *Errors.EDAMSystemException `thrift:"systemException,2"` }
func NewRevokeLongSessionResult ¶
func NewRevokeLongSessionResult() *RevokeLongSessionResult
func (*RevokeLongSessionResult) String ¶
func (p *RevokeLongSessionResult) String() string
type UserStore ¶
type UserStore interface { // This should be the first call made by a client to the EDAM service. It // tells the service what protocol version is used by the client. The // service will then return true if the client is capable of talking to // the service, and false if the client's protocol version is incompatible // with the service, so the client must upgrade. If a client receives a // false value, it should report the incompatibility to the user and not // continue with any more EDAM requests (UserStore or NoteStore). // // @param clientName // This string provides some information about the client for // tracking/logging on the service. It should provide information about // the client's software and platform. The structure should be: // application/version; platform/version; [ device/version ] // E.g. "Evernote Windows/3.0.1; Windows/XP SP3". // // @param edamVersionMajor // This should be the major protocol version that was compiled by the // client. This should be the current value of the EDAM_VERSION_MAJOR // constant for the client. // // @param edamVersionMinor // This should be the major protocol version that was compiled by the // client. This should be the current value of the EDAM_VERSION_MINOR // constant for the client. // // Parameters: // - ClientName // - EdamVersionMajor // - EdamVersionMinor CheckVersion(clientName string, edamVersionMajor int16, edamVersionMinor int16) (r bool, err error) // This provides bootstrap information to the client. Various bootstrap // profiles and settings may be used by the client to configure itself. // // @param locale // The client's current locale, expressed in language[_country] // format. E.g., "en_US". See ISO-639 and ISO-3166 for valid // language and country codes. // // @return // The bootstrap information suitable for this client. // // Parameters: // - Locale GetBootstrapInfo(locale string) (r *BootstrapInfo, err error) // This is used to check a username and password in order to create a // short-lived authentication session that can be used for further actions. // // This function is only available to Evernote's internal applications. // Third party applications must authenticate using OAuth as // described at // <a href="http://dev.evernote.com/documentation/cloud/">dev.evernote.com</a>. // // @param username // The username (not numeric user ID) for the account to // authenticate against. This function will also accept the user's // registered email address in this parameter. // // @param password // The plaintext password to check against the account. Since // this is not protected by the EDAM protocol, this information must be // provided over a protected transport (e.g. SSL). // // @param consumerKey // The "consumer key" portion of the API key issued to the client application // by Evernote. // // @param consumerSecret // The "consumer secret" portion of the API key issued to the client application // by Evernote. // // @param supportsTwoFactor // Whether the calling application supports two-factor authentication. If this // parameter is false, this method will fail with the error code INVALID_AUTH and the // parameter "password" when called for a user who has enabled two-factor // authentication. // // @return // <p>The result of the authentication. If the authentication was successful, // the AuthenticationResult.user field will be set with the full information // about the User.</p> // <p>If the user has two-factor authentication enabled, // AuthenticationResult.secondFactorRequired will be set and // AuthenticationResult.authenticationToken will contain a short-lived token // that may only be used to complete the two-factor authentication process by calling // UserStore.completeTwoFactorAuthentication.</p> // // @throws EDAMUserException <ul> // <li> DATA_REQUIRED "username" - username is empty // <li> DATA_REQUIRED "password" - password is empty // <li> DATA_REQUIRED "consumerKey" - consumerKey is empty // <li> INVALID_AUTH "username" - username not found // <li> INVALID_AUTH "password" - password did not match // <li> INVALID_AUTH "consumerKey" - consumerKey is not authorized // <li> INVALID_AUTH "consumerSecret" - consumerSecret is incorrect // <li> PERMISSION_DENIED "User.active" - user account is closed // <li> PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has // failed authentication too often // </ul> // // Parameters: // - Username // - Password // - ConsumerKey // - ConsumerSecret // - SupportsTwoFactor Authenticate(ctx context.Context, username string, password string, consumerKey string, consumerSecret string, supportsTwoFactor bool) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // This is used to check a username and password in order to create a // long-lived authentication token that can be used for further actions. // // This function is not available to most third party applications, // which typically authenticate using OAuth as // described at // <a href="http://dev.evernote.com/documentation/cloud/">dev.evernote.com</a>. // If you believe that your application requires permission to authenticate // using username and password instead of OAuth, please contact Evernote // developer support by visiting // <a href="http://dev.evernote.com">dev.evernote.com</a>. // // @param username // The username or registered email address of the account to // authenticate against. // // @param password // The plaintext password to check against the account. Since // this is not protected by the EDAM protocol, this information must be // provided over a protected transport (i.e. SSL). // // @param consumerKey // The "consumer key" portion of the API key issued to the client application // by Evernote. // // @param consumerSecret // The "consumer secret" portion of the API key issued to the client application // by Evernote. // // @param deviceIdentifier // An optional string, no more than 32 characters in length, that uniquely identifies // the device from which the authentication is being performed. This string allows // the service to return the same authentication token when a given application // requests authentication repeatedly from the same device. This may happen when the // user logs out of an application and then logs back in, or when the application is // uninstalled and later reinstalled. If no reliable device identifier can be created, // this value should be omitted. If set, the device identifier must be between // 1 and EDAM_DEVICE_ID_LEN_MAX characters long and must match the regular expression // EDAM_DEVICE_ID_REGEX. // // @param deviceDescription // A description of the device from which the authentication is being performed. // This field is displayed to the user in a list of authorized applications to // allow them to distinguish between multiple tokens issued to the same client // application on different devices. For example, the Evernote iOS client on // a user's iPhone and iPad might pass the iOS device names "Bob's iPhone" and // "Bob's iPad". The device description must be between 1 and // EDAM_DEVICE_DESCRIPTION_LEN_MAX characters long and must match the regular // expression EDAM_DEVICE_DESCRIPTION_REGEX. // // @param supportsTwoFactor // Whether the calling application supports two-factor authentication. If this // parameter is false, this method will fail with the error code INVALID_AUTH and the // parameter "password" when called for a user who has enabled two-factor // authentication. // // @return // <p>The result of the authentication. The level of detail provided in the returned // AuthenticationResult.User structure depends on the access level granted by // calling application's API key.</p> // <p>If the user has two-factor authentication enabled, // AuthenticationResult.secondFactorRequired will be set and // AuthenticationResult.authenticationToken will contain a short-lived token // that may only be used to complete the two-factor authentication process by calling // UserStore.completeTwoFactorAuthentication.</p> // // @throws EDAMUserException <ul> // <li> DATA_REQUIRED "username" - username is empty // <li> DATA_REQUIRED "password" - password is empty // <li> DATA_REQUIRED "consumerKey" - consumerKey is empty // <li> DATA_REQUIRED "consumerSecret" - consumerSecret is empty // <li> DATA_REQUIRED "deviceDescription" - deviceDescription is empty // <li> BAD_DATA_FORMAT "deviceDescription" - deviceDescription is not valid. // <li> BAD_DATA_FORMAT "deviceIdentifier" - deviceIdentifier is not valid. // <li> INVALID_AUTH "username" - username not found // <li> INVALID_AUTH "password" - password did not match // <li> INVALID_AUTH "consumerKey" - consumerKey is not authorized // <li> INVALID_AUTH "consumerSecret" - consumerSecret is incorrect // <li> PERMISSION_DENIED "User.active" - user account is closed // <li> PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has // failed authentication too often // </ul> // // Parameters: // - Username // - Password // - ConsumerKey // - ConsumerSecret // - DeviceIdentifier // - DeviceDescription // - SupportsTwoFactor AuthenticateLongSession(ctx context.Context, username string, password string, consumerKey string, consumerSecret string, deviceIdentifier string, deviceDescription string, supportsTwoFactor bool) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // Complete the authentication process when a second factor is required. This // call is made after a successful call to authenticate or authenticateLongSession // when the authenticating user has enabled two-factor authentication. // // @param authenticationToken An authentication token returned by a previous // call to UserStore.authenticate or UserStore.authenticateLongSession that // could not be completed in a single call because a second factor was required. // // @param oneTimeCode The one time code entered by the user. This value is delivered // out-of-band, typically via SMS or an authenticator application. // // @param deviceIdentifier See the corresponding parameter in authenticateLongSession. // // @param deviceDescription See the corresponding parameter in authenticateLongSession. // // @return // The result of the authentication. The level of detail provided in the returned // AuthenticationResult.User structure depends on the access level granted by the // calling application's API key. If the initial authentication call was made to // authenticateLongSession, the AuthenticationResult will contain a long-lived // authentication token. // // @throws EDAMUserException <ul> // <li> DATA_REQUIRED "authenticationToken" - authenticationToken is empty // <li> DATA_REQUIRED "oneTimeCode" - oneTimeCode is empty // <li> BAD_DATA_FORMAT "authenticationToken" - authenticationToken is not well formed // <li> INVALID_AUTH "oneTimeCode" - oneTimeCode did not match // <li> AUTH_EXPIRED "authenticationToken" - authenticationToken has expired // <li> PERMISSION_DENIED "authenticationToken" - authenticationToken is not valid // <li> PERMISSION_DENIED "User.active" - user account is closed // <li> PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has // failed authentication too often // <li> DATA_CONFLICT "User.twoFactorAuthentication" - The user has not enabled // two-factor authentication.</li> // </ul> // // Parameters: // - AuthenticationToken // - OneTimeCode // - DeviceIdentifier // - DeviceDescription CompleteTwoFactorAuthentication(ctx context.Context, authenticationToken string, oneTimeCode string, deviceIdentifier string, deviceDescription string) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // Revoke an existing long lived authentication token. This can be used to // revoke OAuth tokens or tokens created by calling authenticateLongSession, // and allows a user to effectively log out of Evernote from the perspective // of the application that holds the token. The authentication token that is // passed is immediately revoked and may not be used to call any authenticated // EDAM function. // // @param authenticationToken the authentication token to revoke. // // @throws EDAMUserException <ul> // <li> DATA_REQUIRED "authenticationToken" - no authentication token provided // <li> BAD_DATA_FORMAT "authenticationToken" - the authentication token is not well formed // <li> INVALID_AUTH "authenticationToken" - the authentication token is invalid // <li> AUTH_EXPIRED "authenticationToken" - the authentication token is expired or // is already revoked. // </ul> // // Parameters: // - AuthenticationToken RevokeLongSession(ctx context.Context, authenticationToken string) (userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // This is used to take an existing authentication token that grants access // to an individual user account (returned from 'authenticate', // 'authenticateLongSession' or an OAuth authorization) and obtain an additional // authentication token that may be used to access business notebooks if the user // is a member of an Evernote Business account. // // The resulting authentication token may be used to make NoteStore API calls // against the business using the NoteStore URL returned in the result. // // @param authenticationToken // The authentication token for the user. This may not be a shared authentication // token (returned by NoteStore.authenticateToSharedNotebook or // NoteStore.authenticateToSharedNote) or a business authentication token. // // @return // The result of the authentication, with the token granting access to the // business in the result's 'authenticationToken' field. The URL that must // be used to access the business account NoteStore will be returned in the // result's 'noteStoreUrl' field. The 'User' field will // not be set in the result. // // @throws EDAMUserException <ul> // <li> PERMISSION_DENIED "authenticationToken" - the provided authentication token // is a shared or business authentication token. </li> // <li> PERMISSION_DENIED "Business" - the user identified by the provided // authentication token is not currently a member of a business. </li> // <li> PERMISSION_DENIED "Business.status" - the business that the user is a // member of is not currently in an active status. </li> // </ul> // // Parameters: // - AuthenticationToken AuthenticateToBusiness(ctx context.Context, authenticationToken string) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // This is used to take an existing authentication token (returned from // 'authenticate') and exchange it for a newer token which will not expire // as soon. This must be invoked before the previous token expires. // // This function is only availabe to Evernote's internal applications. // // @param authenticationToken // The previous authentication token from the authenticate() result. // // @return // The result of the authentication, with the new token in // the result's 'authenticationToken' field. The 'User' field will // not be set in the result. // // Parameters: // - AuthenticationToken RefreshAuthentication(ctx context.Context, authenticationToken string) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // Returns the User corresponding to the provided authentication token, // or throws an exception if this token is not valid. // The level of detail provided in the returned User structure depends on // the access level granted by the token, so a web service client may receive // fewer fields than an integrated desktop client. // // Parameters: // - AuthenticationToken GetUser(ctx context.Context, authenticationToken string) (r *Types.User, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // Asks the UserStore about the publicly available location information for // a particular username. // // @throws EDAMUserException <ul> // <li> DATA_REQUIRED "username" - username is empty // </ul> // // Parameters: // - Username GetPublicUserInfo(ctx context.Context, username string) (r *PublicUserInfo, notFoundException *Errors.EDAMNotFoundException, systemException *Errors.EDAMSystemException, userException *Errors.EDAMUserException, err error) // Returns information regarding a user's Premium account corresponding to the // provided authentication token, or throws an exception if this token is not // valid. // // Parameters: // - AuthenticationToken GetPremiumInfo(ctx context.Context, authenticationToken string) (r *Types.PremiumInfo, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) // Returns the URL that should be used to talk to the NoteStore for the // account represented by the provided authenticationToken. // This method isn't needed by most clients, who can retrieve the correct // NoteStore URL from the AuthenticationResult returned from the authenticate // or refreshAuthentication calls. This method is typically only needed // to look up the correct URL for a long-lived session token (e.g. for an // OAuth web service). // // Parameters: // - AuthenticationToken GetNoteStoreUrl(ctx context.Context, authenticationToken string) (r string, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error) }
type UserStoreClient ¶
type UserStoreClient struct { Transport thrift.TTransport ProtocolFactory thrift.TProtocolFactory InputProtocol thrift.TProtocol OutputProtocol thrift.TProtocol SeqId int32 }
Service: UserStore <p> The UserStore service is primarily used by EDAM clients to establish authentication via username and password over a trusted connection (e.g. SSL). A client's first call to this interface should be checkVersion() to ensure that the client's software is up to date. </p> All calls which require an authenticationToken may throw an EDAMUserException for the following reasons: <ul>
<li> AUTH_EXPIRED "authenticationToken" - token has expired <li> BAD_DATA_FORMAT "authenticationToken" - token is malformed <li> DATA_REQUIRED "authenticationToken" - token is empty <li> INVALID_AUTH "authenticationToken" - token signature is invalid
</ul>
func NewUserStoreClientFactory ¶
func NewUserStoreClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *UserStoreClient
func NewUserStoreClientProtocol ¶
func NewUserStoreClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *UserStoreClient
func (*UserStoreClient) Authenticate ¶
func (p *UserStoreClient) Authenticate(ctx context.Context, username string, password string, consumerKey string, consumerSecret string, supportsTwoFactor bool) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
This is used to check a username and password in order to create a short-lived authentication session that can be used for further actions.
This function is only available to Evernote's internal applications. Third party applications must authenticate using OAuth as described at <a href="http://dev.evernote.com/documentation/cloud/">dev.evernote.com</a>.
@param username
The username (not numeric user ID) for the account to authenticate against. This function will also accept the user's registered email address in this parameter.
@param password
The plaintext password to check against the account. Since this is not protected by the EDAM protocol, this information must be provided over a protected transport (e.g. SSL).
@param consumerKey
The "consumer key" portion of the API key issued to the client application by Evernote.
@param consumerSecret
The "consumer secret" portion of the API key issued to the client application by Evernote.
@param supportsTwoFactor
Whether the calling application supports two-factor authentication. If this parameter is false, this method will fail with the error code INVALID_AUTH and the parameter "password" when called for a user who has enabled two-factor authentication.
@return
<p>The result of the authentication. If the authentication was successful, the AuthenticationResult.user field will be set with the full information about the User.</p> <p>If the user has two-factor authentication enabled, AuthenticationResult.secondFactorRequired will be set and AuthenticationResult.authenticationToken will contain a short-lived token that may only be used to complete the two-factor authentication process by calling UserStore.completeTwoFactorAuthentication.</p>
@throws EDAMUserException <ul>
<li> DATA_REQUIRED "username" - username is empty <li> DATA_REQUIRED "password" - password is empty <li> DATA_REQUIRED "consumerKey" - consumerKey is empty <li> INVALID_AUTH "username" - username not found <li> INVALID_AUTH "password" - password did not match <li> INVALID_AUTH "consumerKey" - consumerKey is not authorized <li> INVALID_AUTH "consumerSecret" - consumerSecret is incorrect <li> PERMISSION_DENIED "User.active" - user account is closed <li> PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has failed authentication too often
</ul>
Parameters:
- Username
- Password
- ConsumerKey
- ConsumerSecret
- SupportsTwoFactor
func (*UserStoreClient) AuthenticateLongSession ¶
func (p *UserStoreClient) AuthenticateLongSession(ctx context.Context, username string, password string, consumerKey string, consumerSecret string, deviceIdentifier string, deviceDescription string, supportsTwoFactor bool) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
This is used to check a username and password in order to create a long-lived authentication token that can be used for further actions.
This function is not available to most third party applications, which typically authenticate using OAuth as described at <a href="http://dev.evernote.com/documentation/cloud/">dev.evernote.com</a>. If you believe that your application requires permission to authenticate using username and password instead of OAuth, please contact Evernote developer support by visiting <a href="http://dev.evernote.com">dev.evernote.com</a>.
@param username
The username or registered email address of the account to authenticate against.
@param password
The plaintext password to check against the account. Since this is not protected by the EDAM protocol, this information must be provided over a protected transport (i.e. SSL).
@param consumerKey
The "consumer key" portion of the API key issued to the client application by Evernote.
@param consumerSecret
The "consumer secret" portion of the API key issued to the client application by Evernote.
@param deviceIdentifier
An optional string, no more than 32 characters in length, that uniquely identifies the device from which the authentication is being performed. This string allows the service to return the same authentication token when a given application requests authentication repeatedly from the same device. This may happen when the user logs out of an application and then logs back in, or when the application is uninstalled and later reinstalled. If no reliable device identifier can be created, this value should be omitted. If set, the device identifier must be between 1 and EDAM_DEVICE_ID_LEN_MAX characters long and must match the regular expression EDAM_DEVICE_ID_REGEX.
@param deviceDescription
A description of the device from which the authentication is being performed. This field is displayed to the user in a list of authorized applications to allow them to distinguish between multiple tokens issued to the same client application on different devices. For example, the Evernote iOS client on a user's iPhone and iPad might pass the iOS device names "Bob's iPhone" and "Bob's iPad". The device description must be between 1 and EDAM_DEVICE_DESCRIPTION_LEN_MAX characters long and must match the regular expression EDAM_DEVICE_DESCRIPTION_REGEX.
@param supportsTwoFactor
Whether the calling application supports two-factor authentication. If this parameter is false, this method will fail with the error code INVALID_AUTH and the parameter "password" when called for a user who has enabled two-factor authentication.
@return
<p>The result of the authentication. The level of detail provided in the returned AuthenticationResult.User structure depends on the access level granted by calling application's API key.</p> <p>If the user has two-factor authentication enabled, AuthenticationResult.secondFactorRequired will be set and AuthenticationResult.authenticationToken will contain a short-lived token that may only be used to complete the two-factor authentication process by calling UserStore.completeTwoFactorAuthentication.</p>
@throws EDAMUserException <ul>
<li> DATA_REQUIRED "username" - username is empty <li> DATA_REQUIRED "password" - password is empty <li> DATA_REQUIRED "consumerKey" - consumerKey is empty <li> DATA_REQUIRED "consumerSecret" - consumerSecret is empty <li> DATA_REQUIRED "deviceDescription" - deviceDescription is empty <li> BAD_DATA_FORMAT "deviceDescription" - deviceDescription is not valid. <li> BAD_DATA_FORMAT "deviceIdentifier" - deviceIdentifier is not valid. <li> INVALID_AUTH "username" - username not found <li> INVALID_AUTH "password" - password did not match <li> INVALID_AUTH "consumerKey" - consumerKey is not authorized <li> INVALID_AUTH "consumerSecret" - consumerSecret is incorrect <li> PERMISSION_DENIED "User.active" - user account is closed <li> PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has failed authentication too often
</ul>
Parameters:
- Username
- Password
- ConsumerKey
- ConsumerSecret
- DeviceIdentifier
- DeviceDescription
- SupportsTwoFactor
func (*UserStoreClient) AuthenticateToBusiness ¶
func (p *UserStoreClient) AuthenticateToBusiness(ctx context.Context, authenticationToken string) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
This is used to take an existing authentication token that grants access to an individual user account (returned from 'authenticate', 'authenticateLongSession' or an OAuth authorization) and obtain an additional authentication token that may be used to access business notebooks if the user is a member of an Evernote Business account.
The resulting authentication token may be used to make NoteStore API calls against the business using the NoteStore URL returned in the result.
@param authenticationToken
The authentication token for the user. This may not be a shared authentication token (returned by NoteStore.authenticateToSharedNotebook or NoteStore.authenticateToSharedNote) or a business authentication token.
@return
The result of the authentication, with the token granting access to the business in the result's 'authenticationToken' field. The URL that must be used to access the business account NoteStore will be returned in the result's 'noteStoreUrl' field. The 'User' field will not be set in the result.
@throws EDAMUserException <ul>
<li> PERMISSION_DENIED "authenticationToken" - the provided authentication token is a shared or business authentication token. </li> <li> PERMISSION_DENIED "Business" - the user identified by the provided authentication token is not currently a member of a business. </li> <li> PERMISSION_DENIED "Business.status" - the business that the user is a member of is not currently in an active status. </li>
</ul>
Parameters:
- AuthenticationToken
func (*UserStoreClient) CheckVersion ¶
func (p *UserStoreClient) CheckVersion(ctx context.Context, clientName string, edamVersionMajor int16, edamVersionMinor int16) (r bool, err error)
This should be the first call made by a client to the EDAM service. It tells the service what protocol version is used by the client. The service will then return true if the client is capable of talking to the service, and false if the client's protocol version is incompatible with the service, so the client must upgrade. If a client receives a false value, it should report the incompatibility to the user and not continue with any more EDAM requests (UserStore or NoteStore).
@param clientName
This string provides some information about the client for tracking/logging on the service. It should provide information about the client's software and platform. The structure should be: application/version; platform/version; [ device/version ] E.g. "Evernote Windows/3.0.1; Windows/XP SP3".
@param edamVersionMajor
This should be the major protocol version that was compiled by the client. This should be the current value of the EDAM_VERSION_MAJOR constant for the client.
@param edamVersionMinor
This should be the major protocol version that was compiled by the client. This should be the current value of the EDAM_VERSION_MINOR constant for the client.
Parameters:
- ClientName
- EdamVersionMajor
- EdamVersionMinor
func (*UserStoreClient) CompleteTwoFactorAuthentication ¶
func (p *UserStoreClient) CompleteTwoFactorAuthentication(ctx context.Context, authenticationToken string, oneTimeCode string, deviceIdentifier string, deviceDescription string) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
Complete the authentication process when a second factor is required. This call is made after a successful call to authenticate or authenticateLongSession when the authenticating user has enabled two-factor authentication.
@param authenticationToken An authentication token returned by a previous
call to UserStore.authenticate or UserStore.authenticateLongSession that could not be completed in a single call because a second factor was required.
@param oneTimeCode The one time code entered by the user. This value is delivered
out-of-band, typically via SMS or an authenticator application.
@param deviceIdentifier See the corresponding parameter in authenticateLongSession.
@param deviceDescription See the corresponding parameter in authenticateLongSession.
@return
The result of the authentication. The level of detail provided in the returned AuthenticationResult.User structure depends on the access level granted by the calling application's API key. If the initial authentication call was made to authenticateLongSession, the AuthenticationResult will contain a long-lived authentication token.
@throws EDAMUserException <ul>
<li> DATA_REQUIRED "authenticationToken" - authenticationToken is empty <li> DATA_REQUIRED "oneTimeCode" - oneTimeCode is empty <li> BAD_DATA_FORMAT "authenticationToken" - authenticationToken is not well formed <li> INVALID_AUTH "oneTimeCode" - oneTimeCode did not match <li> AUTH_EXPIRED "authenticationToken" - authenticationToken has expired <li> PERMISSION_DENIED "authenticationToken" - authenticationToken is not valid <li> PERMISSION_DENIED "User.active" - user account is closed <li> PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has failed authentication too often <li> DATA_CONFLICT "User.twoFactorAuthentication" - The user has not enabled two-factor authentication.</li>
</ul>
Parameters:
- AuthenticationToken
- OneTimeCode
- DeviceIdentifier
- DeviceDescription
func (*UserStoreClient) GetBootstrapInfo ¶
func (p *UserStoreClient) GetBootstrapInfo(ctx context.Context, locale string) (r *BootstrapInfo, err error)
This provides bootstrap information to the client. Various bootstrap profiles and settings may be used by the client to configure itself.
@param locale
The client's current locale, expressed in language[_country] format. E.g., "en_US". See ISO-639 and ISO-3166 for valid language and country codes.
@return
The bootstrap information suitable for this client.
Parameters:
- Locale
func (*UserStoreClient) GetNoteStoreUrl ¶
func (p *UserStoreClient) GetNoteStoreUrl(ctx context.Context, authenticationToken string) (r string, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
Returns the URL that should be used to talk to the NoteStore for the account represented by the provided authenticationToken. This method isn't needed by most clients, who can retrieve the correct NoteStore URL from the AuthenticationResult returned from the authenticate or refreshAuthentication calls. This method is typically only needed to look up the correct URL for a long-lived session token (e.g. for an OAuth web service).
Parameters:
- AuthenticationToken
func (*UserStoreClient) GetPremiumInfo ¶
func (p *UserStoreClient) GetPremiumInfo(ctx context.Context, authenticationToken string) (r *Types.PremiumInfo, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
Returns information regarding a user's Premium account corresponding to the provided authentication token, or throws an exception if this token is not valid.
Parameters:
- AuthenticationToken
func (*UserStoreClient) GetPublicUserInfo ¶
func (p *UserStoreClient) GetPublicUserInfo(ctx context.Context, username string) (r *PublicUserInfo, notFoundException *Errors.EDAMNotFoundException, systemException *Errors.EDAMSystemException, userException *Errors.EDAMUserException, err error)
Asks the UserStore about the publicly available location information for a particular username.
@throws EDAMUserException <ul>
<li> DATA_REQUIRED "username" - username is empty
</ul>
Parameters:
- Username
func (*UserStoreClient) GetUser ¶
func (p *UserStoreClient) GetUser(ctx context.Context, authenticationToken string) (r *Types.User, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
Returns the User corresponding to the provided authentication token, or throws an exception if this token is not valid. The level of detail provided in the returned User structure depends on the access level granted by the token, so a web service client may receive fewer fields than an integrated desktop client.
Parameters:
- AuthenticationToken
func (*UserStoreClient) RefreshAuthentication ¶
func (p *UserStoreClient) RefreshAuthentication(ctx context.Context, authenticationToken string) (r *AuthenticationResult, userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
This is used to take an existing authentication token (returned from 'authenticate') and exchange it for a newer token which will not expire as soon. This must be invoked before the previous token expires.
This function is only availabe to Evernote's internal applications.
@param authenticationToken
The previous authentication token from the authenticate() result.
@return
The result of the authentication, with the new token in the result's 'authenticationToken' field. The 'User' field will not be set in the result.
Parameters:
- AuthenticationToken
func (*UserStoreClient) RevokeLongSession ¶
func (p *UserStoreClient) RevokeLongSession(ctx context.Context, authenticationToken string) (userException *Errors.EDAMUserException, systemException *Errors.EDAMSystemException, err error)
Revoke an existing long lived authentication token. This can be used to revoke OAuth tokens or tokens created by calling authenticateLongSession, and allows a user to effectively log out of Evernote from the perspective of the application that holds the token. The authentication token that is passed is immediately revoked and may not be used to call any authenticated EDAM function.
@param authenticationToken the authentication token to revoke.
@throws EDAMUserException <ul>
<li> DATA_REQUIRED "authenticationToken" - no authentication token provided <li> BAD_DATA_FORMAT "authenticationToken" - the authentication token is not well formed <li> INVALID_AUTH "authenticationToken" - the authentication token is invalid <li> AUTH_EXPIRED "authenticationToken" - the authentication token is expired or is already revoked.
</ul>
Parameters:
- AuthenticationToken
type UserStoreProcessor ¶
type UserStoreProcessor struct {
// contains filtered or unexported fields
}
func NewUserStoreProcessor ¶
func NewUserStoreProcessor(handler UserStore) *UserStoreProcessor
func (*UserStoreProcessor) AddToProcessorMap ¶
func (p *UserStoreProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
func (*UserStoreProcessor) GetProcessorFunction ¶
func (p *UserStoreProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
func (*UserStoreProcessor) Process ¶
func (p *UserStoreProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, exp thrift.TException)
func (*UserStoreProcessor) ProcessorMap ¶
func (p *UserStoreProcessor) ProcessorMap() map[string]thrift.TProcessorFunction