Documentation ¶
Index ¶
- Variables
- func AddSocialProvider(data AddProviderSchema) error
- func CheckHookID(hookid string) (bool, error)
- func CheckLoginMethod() error
- func CheckPlan() error
- func CheckToken(token string) (bool, error)
- func CurrentID() (int64, error)
- func DeleteCustomField(field string) (*bool, error)
- func GetActiveProviders() (map[string]ActiveProvider, error)
- func GetAllProviders() (map[string]ProviderSchema, error)
- func GetAppsInfo() (map[int64]SitesReponse, error)
- func IsPasswordLessEnabled(features FeatureSchema) bool
- func IsPhoneLoginEnabled(features FeatureSchema) bool
- func ResetSecret() error
- func SitesBasic(tokens *SitesToken) error
- func UpdateDomain(domains []string) error
- func UpdateProviderStatus(provider string, status bool) error
- type AccountPayment
- type ActiveProvider
- type AddCFRespSchema
- type AddProviderObj
- type AddProviderSchema
- type CoreAppData
- type CustomFieldSchema
- type Feature
- type FeatureSchema
- type FieldSchema
- type FieldTypeConfig
- type HooksResponse
- type HostedPageResponse
- type LoginOpts
- type LoginResponse
- type OptSchema
- type PasswordlessLogin
- type ProviderOptSchema
- type ProviderSchema
- type RegistrationSchema
- type ResetResponse
- type Schema
- type SitesReponse
- type SitesToken
- type SottResponse
- type UpdateRegFieldSchema
- type ValidateTokenResp
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeMap = map[int]FieldTypeConfig{ 0: { Name: "string", Display: "String", ShouldDisplayValidaitonRuleInput: true, ShouldShowOption: false, }, 1: { Name: "option", Display: "Option", ShouldDisplayValidaitonRuleInput: false, ShouldShowOption: true, }, 2: { Name: "multi", Display: "CheckBox", ShouldDisplayValidaitonRuleInput: false, ShouldShowOption: false, }, 3: { Name: "password", Display: "Password", ShouldDisplayValidaitonRuleInput: true, ShouldShowOption: false, }, 4: { Name: "email", Display: "Email", ShouldDisplayValidaitonRuleInput: true, ShouldShowOption: false, }, 5: { Name: "text", Display: "Text", ShouldDisplayValidaitonRuleInput: true, ShouldShowOption: false, }, }
Functions ¶
func AddSocialProvider ¶ added in v1.0.0
func AddSocialProvider(data AddProviderSchema) error
func CheckHookID ¶ added in v0.3.0
func CheckLoginMethod ¶ added in v1.0.0
func CheckLoginMethod() error
func CheckToken ¶ added in v1.1.0
This function uses Authenticity token to check if SOTT exists.
func DeleteCustomField ¶ added in v1.0.0
func GetActiveProviders ¶ added in v0.3.2
func GetActiveProviders() (map[string]ActiveProvider, error)
func GetAllProviders ¶ added in v1.0.0
func GetAllProviders() (map[string]ProviderSchema, error)
func GetAppsInfo ¶ added in v0.3.0
func GetAppsInfo() (map[int64]SitesReponse, error)
func IsPasswordLessEnabled ¶ added in v1.0.0
func IsPasswordLessEnabled(features FeatureSchema) bool
func IsPhoneLoginEnabled ¶ added in v1.0.0
func IsPhoneLoginEnabled(features FeatureSchema) bool
func ResetSecret ¶ added in v0.3.0
func ResetSecret() error
func SitesBasic ¶ added in v0.3.0
func SitesBasic(tokens *SitesToken) error
func UpdateDomain ¶ added in v0.3.0
func UpdateProviderStatus ¶ added in v1.0.0
Types ¶
type AccountPayment ¶ added in v0.3.0
type AccountPayment struct { Data struct { Order []struct { Totalamount int `json:"TotalAmount"` Recurringprofileid interface{} `json:"RecurringProfileId"` Basediscount int `json:"BaseDiscount"` Promotionaldiscount int `json:"PromotionalDiscount"` Initialamount int `json:"InitialAmount"` Tax int `json:"Tax"` UUID interface{} `json:"Uuid"` Invoiceno int `json:"InvoiceNo"` Createddate time.Time `json:"CreatedDate"` Lastmodifieddate time.Time `json:"LastModifiedDate"` Isactive bool `json:"IsActive"` Isdeleted bool `json:"IsDeleted"` Orderid int `json:"OrderId"` Paymentdetail struct { Stripecustomerid string `json:"StripeCustomerId"` Stripepaymentmethodid string `json:"StripePaymentMethodId"` } `json:"PaymentDetail"` Orderdetails []interface{} `json:"OrderDetails"` } `json:"Order"` Carddetails struct { Expmonth int `json:"expMonth"` Expyear int `json:"expYear"` Last4 string `json:"last4"` } `json:"cardDetails"` } `json:"data"` }
func PaymentInfo ¶ added in v0.3.0
func PaymentInfo() (*AccountPayment, error)
type ActiveProvider ¶ added in v1.0.0
type ActiveProvider struct { HtmlFileName string `json:"HtmlFileName"` Provider string `json:"Provider"` ProviderId int `json:"ProviderId"` ProviderKey string `json:"ProviderKey"` ProviderSecret string `json:"ProviderSecret"` Scope []string `json:"Scope"` Status bool `json:"Status"` }
Social Provider Schemas
type AddCFRespSchema ¶ added in v1.0.0
type AddCFRespSchema struct { ResponseAddCustomField struct { Data []CustomFieldSchema `json:"Data"` } `json:"responseAddCustomField"` }
func AddCustomField ¶ added in v1.0.0
func AddCustomField(customfield string) (*AddCFRespSchema, error)
type AddProviderObj ¶ added in v1.0.0
type AddProviderSchema ¶ added in v1.0.0
type AddProviderSchema struct {
Data []AddProviderObj `json:"Data"`
}
type CoreAppData ¶ added in v0.3.0
type CoreAppData struct { Apps struct { Data []SitesReponse `json:"Data"` } `json:"apps"` }
type CustomFieldSchema ¶ added in v1.0.0
type FeatureSchema ¶ added in v1.0.0
type FeatureSchema struct {
Data []Feature `json:"Data"`
}
func GetSiteFeatures ¶ added in v1.0.0
func GetSiteFeatures() (*FeatureSchema, error)
func UpdatePhoneLogin ¶ added in v1.0.0
func UpdatePhoneLogin(feature string, status bool) (*FeatureSchema, error)
type FieldSchema ¶ added in v1.0.0
type FieldSchema struct { CustomFields []CustomFieldSchema `json:"customFields"` RegistrationFields map[string]Schema `json:"registrationFields"` }
type FieldTypeConfig ¶ added in v0.3.0
type HooksResponse ¶ added in v0.3.0
type HostedPageResponse ¶
type HostedPageResponse struct { Pages []struct { Pagetype string `json:"PageType"` Customcss []string `json:"CustomCss"` Headtags []interface{} `json:"HeadTags"` Favicon string `json:"FavIcon"` Htmlbody string `json:"HtmlBody"` Endscript string `json:"EndScript"` Beforescript string `json:"BeforeScript"` Customjs []string `json:"CustomJS"` Isactive bool `json:"IsActive"` Mainscript string `json:"MainScript"` Commonscript string `json:"CommonScript"` Status string `json:"Status"` } `json:"Pages"` }
func GetPage ¶
func GetPage() (*HostedPageResponse, error)
type LoginOpts ¶ added in v0.3.1
type LoginOpts struct { AccessToken string `schema:"token" json:"accesstoken"` AppName string `schema:"appName"` Domain string `schema:"domain" json:"domain"` DataCenter string `schema:"dataCenter" json:"dataCenter"` Plan string `schema:"plan" json:"plan"` Role string `schema:"role" json:"role"` LookingFor string `schema:"lookingFor" json:"lookingFor"` }
type LoginResponse ¶
type LoginResponse struct { APIVersion string `json:"api_Version"` AppID int64 `json:"app_id"` AppName string `json:"app_name"` Authenticated bool `json:"authenticated"` NoOfLogins int32 `json:"no_of_logins"` PlanDetails interface{} `json"plan_detail"` XSign string `json:"xsign"` XToken string `json:"xtoken"` }
func AuthLogin ¶
func AuthLogin(params LoginOpts) (*LoginResponse, error)
type PasswordlessLogin ¶ added in v1.0.0
type PasswordlessLogin struct {
Enabled bool `json:"isEnabled"`
}
func UpdatePasswordlessLogin ¶ added in v1.0.0
func UpdatePasswordlessLogin(body []byte) (*PasswordlessLogin, error)
type ProviderOptSchema ¶ added in v1.0.0
type ProviderSchema ¶ added in v1.0.0
type RegistrationSchema ¶ added in v1.0.0
type RegistrationSchema struct {
Data FieldSchema `json:"data"`
}
func GetRegistrationFields ¶ added in v1.0.0
func GetRegistrationFields() (*RegistrationSchema, error)
func UpdateRegField ¶ added in v1.0.0
func UpdateRegField(data UpdateRegFieldSchema) (*RegistrationSchema, error)
type ResetResponse ¶ added in v0.3.0
type SitesReponse ¶
type SitesReponse struct { Appname string `json:"AppName"` Customername *string `json:"CustomerName"` Webtechnology int `json:"WebTechnology"` Domain string `json:"Domain"` Callbackurl string `json:"CallbackUrl"` Devdomain string `json:"DevDomain"` Ismobile bool `json:"IsMobile"` Appid int64 `json:"AppId"` Key string `json:"Key"` Secret string `json:"Secret"` Role string `json:"Role"` Iswelcomeemailenabled bool `json:"IsWelcomeEmailEnabled"` Ishttps bool `json:"Ishttps"` Interfaceid int `json:"InterfaceId"` Recurlyaccountcode *string `json:"RecurlyAccountCode"` Userlimit int `json:"UserLimit"` Domainlimit int `json:"DomainLimit"` Datecreated time.Time `json:"DateCreated"` Datemodified time.Time `json:"DateModified"` Status bool `json:"Status"` Profilephoto *string `json:"ProfilePhoto"` Apiversion string `json:"ApiVersion"` Israasenabled bool `json:"IsRaasEnabled"` Privacypolicy interface{} `json:"PrivacyPolicy"` Termsofservice interface{} `json:"TermsOfService"` Ownerid string `json:"OwnerId"` Productplan *struct { Name string `json:"Name"` Expirytime time.Time `json:"ExpiryTime"` Billingcycle interface{} `json:"BillingCycle"` Fromdate interface{} `json:"FromDate"` } `json:"ProductPlan"` }
func GetSites ¶
func GetSites() (*SitesReponse, error)
type SitesToken ¶ added in v0.3.0
type SitesToken struct { APIVersion string `json:"ApiVersion"` AppID int64 `json:"AppId"` AppName string `json:"AppName"` Authenticated bool `json:"authenticated"` XSign string `json:"xsign"` XToken string `json:"xtoken"` }
func SetSites ¶ added in v0.3.0
func SetSites(appid int64) (*SitesToken, error)
type SottResponse ¶ added in v1.1.0
type SottResponse struct { Data []struct { AuthenticityToken string `json:"AuthenticityToken"` Comment string `json:"Comment"` CreatedDate string `json:"CreatedDate"` DateRange string `json:"DateRange"` IsEncoded bool `json:"IsEncoded"` Technology string `json:"Technology"` } `json:"Data"` }
func GetSott ¶ added in v1.1.0
func GetSott() (*SottResponse, error)
type UpdateRegFieldSchema ¶ added in v1.0.0
type UpdateRegFieldSchema struct {
Fields []Schema `json:"fields"`
}
type ValidateTokenResp ¶
type ValidateTokenResp struct { AccessToken string `json:"access_token"` ExpiresIn time.Time `json:"expires_in"` RefreshToken string `json:"refresh_token"` }
func AuthValidateToken ¶
func AuthValidateToken() (*ValidateTokenResp, error)
Click to show internal directories.
Click to hide internal directories.