api

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeMap = map[int]FieldTypeConfig{
	1: FieldTypeConfig{
		Name:                             "String",
		ShouldDisplayValidaitonRuleInput: true,
		ShouldShowOption:                 false,
	},
	2: FieldTypeConfig{
		Name:                             "CheckBox",
		ShouldDisplayValidaitonRuleInput: false,
		ShouldShowOption:                 false,
	},
	3: FieldTypeConfig{
		Name:                             "Option",
		ShouldDisplayValidaitonRuleInput: false,
		ShouldShowOption:                 true,
	},
	4: FieldTypeConfig{
		Name:                             "Password",
		ShouldDisplayValidaitonRuleInput: true,
		ShouldShowOption:                 false,
	},
	5: FieldTypeConfig{
		Name:                             "Hidden",
		ShouldDisplayValidaitonRuleInput: true,
		ShouldShowOption:                 false,
	},
	6: FieldTypeConfig{
		Name:                             "Email",
		ShouldDisplayValidaitonRuleInput: true,
		ShouldShowOption:                 false,
	},
	7: FieldTypeConfig{
		Name:                             "Text",
		ShouldDisplayValidaitonRuleInput: true,
		ShouldShowOption:                 false,
	},
}

Functions

func CheckHookID added in v0.3.0

func CheckHookID(hookid string) (bool, error)

func CurrentPlan added in v0.3.0

func CurrentPlan() error

func GetAppsInfo added in v0.3.0

func GetAppsInfo() (map[int64]SitesReponse, error)

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 UpdateDomain(domains string) error

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"`
	Sharedsiteownerdata interface{} `json:"sharedSiteOwnerData"`
}

func PaymentInfo added in v0.3.0

func PaymentInfo() (*AccountPayment, error)

type AppID added in v0.3.0

type AppID struct {
	CurrentAppId int64 `json:"currentAppId"`
}

func CurrentID added in v0.3.0

func CurrentID() (*AppID, error)

type Array added in v0.3.0

type Array struct {
	Value string `json:"value"`
	Text  string `json:"text"`
}

type CoreAppData added in v0.3.0

type CoreAppData struct {
	Apps struct {
		Data []SitesReponse `json:"Data"`
	} `json:"apps"`
}

type FieldTypeConfig added in v0.3.0

type FieldTypeConfig struct {
	Name                             string
	ShouldDisplayValidaitonRuleInput bool
	ShouldShowOption                 bool
}

type HooksResponse added in v0.3.0

type HooksResponse struct {
	Data []struct {
		ID               string    `json:"Id"`
		Appid            int       `json:"AppId"`
		Createddate      time.Time `json:"CreatedDate"`
		Lastmodifieddate time.Time `json:"LastModifiedDate"`
		Targeturl        string    `json:"TargetUrl"`
		Event            string    `json:"Event"`
		Name             string    `json:"Name"`
	} `json:"Data"`
}

func Hooks added in v0.3.0

func Hooks(method string, body string) (*HooksResponse, error)

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 LoginResponse

type LoginResponse struct {
	APIVersion    string      `json:"api_Version"`
	AppID         int32       `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(accessToken string) (*LoginResponse, error)

type ResetResponse added in v0.3.0

type ResetResponse struct {
	Secret string `json:"Secret"`
	XSign  string `json:"xsign"`
	XToken string `json:"xtoken"`
}

type ResultResp added in v0.3.0

type ResultResp struct {
	Data []Schema `json:"Data"`
}

func GetFields added in v0.3.0

func GetFields(tem string) (*ResultResp, error)

type Schema added in v0.3.0

type Schema struct {
	Display          string  `json:"Display"`
	Enabled          bool    `json:"Enabled"`
	IsMandatory      bool    `json:"IsMandatory"`
	Parent           string  `json:"Parent"`
	ParentDataSource string  `json:"ParentDataSource"`
	Permission       string  `json:"Permission"`
	Name             string  `json:"name"`
	Options          []Array `json:"options"`
	Rules            string  `json:"rules"`
	Status           string  `json:"status"`
	Type             string  `json:"type"`
}

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         int32  `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 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL