Versions in this module Expand all Collapse all v0 v0.41.2 Apr 15, 2024 Changes in this version + type Config struct + Application string + Certificate string + ClientID string + ClientSecret string + Endpoint string + Organization string v0.41.1 Apr 15, 2024 Changes in this version + const MfaRecoveryCodesSession + var CasdoorApplication = "app-built-in" + var CasdoorOrganization = "built-in" + var TestCasdoorApplication = "app-vue-python-example" + var TestCasdoorEndpoint = "https://demo.casdoor.com" + var TestCasdoorOrganization = "casbin" + var TestClientId = "294b09fbc17f95daf2fe" + var TestClientSecret = "dd8982f7046ccba1bbd7851d5c1ece4e52bf039d" + var TestJwtPublicKey = ... + func AddAdapter(adapter *Adapter) (bool, error) + func AddApplication(application *Application) (bool, error) + func AddCert(cert *Cert) (bool, error) + func AddEnforcer(enforcer *Enforcer) (bool, error) + func AddGroup(group *Group) (bool, error) + func AddModel(model *Model) (bool, error) + func AddOrganization(organization *Organization) (bool, error) + func AddPayment(payment *Payment) (bool, error) + func AddPermission(permission *Permission) (bool, error) + func AddPlan(plan *Plan) (bool, error) + func AddPolicy(enforcer *Enforcer, policy *CasbinRule) (bool, error) + func AddPricing(pricing *Pricing) (bool, error) + func AddProduct(product *Product) (bool, error) + func AddProvider(provider *Provider) (bool, error) + func AddRecord(record *Record) (bool, error) + func AddRole(role *Role) (bool, error) + func AddSession(session *Session) (bool, error) + func AddSubscription(subscription *Subscription) (bool, error) + func AddSyncer(syncer *Syncer) (bool, error) + func AddToken(token *Token) (bool, error) + func AddTransaction(transaction *Transaction) (bool, error) + func AddUser(user *User) (bool, error) + func AddWebhook(webhook *Webhook) (bool, error) + func BatchEnforce(permissionId, modelId, resourceId string, casbinRequests []CasbinRequest) ([][]bool, error) + func CheckUserPassword(user *User) (bool, error) + func DeleteAdapter(adapter *Adapter) (bool, error) + func DeleteApplication(application *Application) (bool, error) + func DeleteCert(cert *Cert) (bool, error) + func DeleteEnforcer(enforcer *Enforcer) (bool, error) + func DeleteGroup(group *Group) (bool, error) + func DeleteModel(model *Model) (bool, error) + func DeleteOrganization(organization *Organization) (bool, error) + func DeletePayment(payment *Payment) (bool, error) + func DeletePermission(permission *Permission) (bool, error) + func DeletePlan(plan *Plan) (bool, error) + func DeletePricing(pricing *Pricing) (bool, error) + func DeleteProduct(product *Product) (bool, error) + func DeleteProvider(provider *Provider) (bool, error) + func DeleteResource(resource *Resource) (bool, error) + func DeleteRole(role *Role) (bool, error) + func DeleteSession(session *Session) (bool, error) + func DeleteSubscription(subscription *Subscription) (bool, error) + func DeleteSyncer(syncer *Syncer) (bool, error) + func DeleteToken(token *Token) (bool, error) + func DeleteTransaction(transaction *Transaction) (bool, error) + func DeleteUser(user *User) (bool, error) + func DeleteWebhook(webhook *Webhook) (bool, error) + func DoGetBytes(url string) ([]byte, error) + func DoGetBytesRaw(url string) ([]byte, error) + func DoPostBytesRaw(url string, contentType string, body io.Reader) ([]byte, error) + func Enforce(permissionId, modelId, resourceId string, casbinRequest CasbinRequest) (bool, error) + func GetCurrentTime() string + func GetMyProfileUrl(accessToken string) string + func GetOAuthToken(code string, state string) (*oauth2.Token, error) + func GetSigninUrl(redirectUri string) string + func GetSignupUrl(enablePassword bool, redirectUri string) string + func GetUrl(action string, queryMap map[string]string) string + func GetUserCount(isOnline string) (int, error) + func GetUserProfileUrl(userName string, accessToken string) string + func InitConfig(endpoint string, clientId string, clientSecret string, certificate string, ...) + func InvoicePayment(payment *Payment) (bool, error) + func NotifyPayment(payment *Payment) (bool, error) + func RefreshOAuthToken(refreshToken string) (*oauth2.Token, error) + func RemovePolicy(enforcer *Enforcer, policy *CasbinRule) (bool, error) + func SendEmail(title string, content string, sender string, receivers ...string) error + func SendSms(content string, receivers ...string) error + func SetHttpClient(httpClient HttpClient) + func SetPassword(owner, name, oldPassword, newPassword string) (bool, error) + func UpdateAdapter(adapter *Adapter) (bool, error) + func UpdateApplication(application *Application) (bool, error) + func UpdateCert(cert *Cert) (bool, error) + func UpdateEnforcer(enforcer *Enforcer) (bool, error) + func UpdateGroup(group *Group) (bool, error) + func UpdateModel(model *Model) (bool, error) + func UpdateOrganization(organization *Organization) (bool, error) + func UpdatePayment(payment *Payment) (bool, error) + func UpdatePermission(permission *Permission) (bool, error) + func UpdatePermissionForColumns(permission *Permission, columns []string) (bool, error) + func UpdatePlan(plan *Plan) (bool, error) + func UpdatePolicy(enforcer *Enforcer, oldpolicy *CasbinRule, newpolicy *CasbinRule) (bool, error) + func UpdatePricing(pricing *Pricing) (bool, error) + func UpdateProduct(product *Product) (bool, error) + func UpdateProvider(provider *Provider) (bool, error) + func UpdateRole(role *Role) (bool, error) + func UpdateRoleForColumns(role *Role, columns []string) (bool, error) + func UpdateSession(session *Session) (bool, error) + func UpdateSessionForColumns(session *Session, columns []string) (bool, error) + func UpdateSubscription(subscription *Subscription) (bool, error) + func UpdateSyncer(syncer *Syncer) (bool, error) + func UpdateToken(token *Token) (bool, error) + func UpdateTokenForColumns(token *Token, columns []string) (bool, error) + func UpdateTransaction(transaction *Transaction) (bool, error) + func UpdateUser(user *User) (bool, error) + func UpdateUserById(id string, user *User) (bool, error) + func UpdateUserForColumns(user *User, columns []string) (bool, error) + func UpdateWebhook(webhook *Webhook) (bool, error) + func UploadResource(user string, tag string, parent string, fullFilePath string, fileBytes []byte) (string, string, error) + func UploadResourceEx(user string, tag string, parent string, fullFilePath string, fileBytes []byte, ...) (string, string, error) + type AccountItem struct + ModifyRule string + Name string + ViewRule string + Visible bool + type Adapter struct + CreatedTime string + Database string + DatabaseType string + Host string + IsEnabled bool + Name string + Owner string + Password string + Port int + Table string + TableNamePrefix string + Type string + User string + func GetAdapter(name string) (*Adapter, error) + func GetAdapters() ([]*Adapter, error) + func GetPaginationAdapters(p int, pageSize int, queryMap map[string]string) ([]*Adapter, int, error) + type Application struct + AffiliationUrl string + Cert string + ClientId string + ClientSecret string + CreatedTime string + Description string + DisplayName string + EnableAutoSignin bool + EnableCodeSignin bool + EnableLinkWithEmail bool + EnablePassword bool + EnableSamlCompress bool + EnableSignUp bool + EnableSigninSession bool + EnableWebAuthn bool + ExpireInHours int + ForgetUrl string + FormBackgroundUrl string + FormCss string + FormCssMobile string + FormOffset int + FormSideHtml string + GrantTypes []string + HomepageUrl string + Logo string + Name string + OrgChoiceMode string + Organization string + OrganizationObj *Organization + Owner string + Providers []*ProviderItem + RedirectUris []string + RefreshExpireInHours int + SamlReplyUrl string + SigninHtml string + SigninUrl string + SignupHtml string + SignupItems []*SignupItem + SignupUrl string + Tags []string + TermsOfUse string + ThemeData *ThemeData + TokenFormat string + func GetApplication(name string) (*Application, error) + func GetApplications() ([]*Application, error) + func GetOrganizationApplications() ([]*Application, error) + type AuthConfig struct + ApplicationName string + Certificate string + ClientId string + ClientSecret string + Endpoint string + OrganizationName string + type CasbinRequest = []interface + type CasbinRule struct + Id int64 + Ptype string + V0 string + V1 string + V2 string + V3 string + V4 string + V5 string + func GetPolicies(enforcerName string, adapterId string) ([]*CasbinRule, error) + type Cert struct + AuthorityPublicKey string + AuthorityRootPublicKey string + BitSize int + Certificate string + CreatedTime string + CryptoAlgorithm string + DisplayName string + ExpireInYears int + Name string + Owner string + PrivateKey string + Scope string + Type string + func GetCert(name string) (*Cert, error) + func GetCerts() ([]*Cert, error) + func GetGlobalCerts() ([]*Cert, error) + type Claims struct + AccessToken string + Application string + RefreshTokenType string + TokenType string + func ParseJwtToken(token string) (*Claims, error) + func (c Claims) IsRefreshToken() bool + type Client struct + func NewClient(endpoint string, clientId string, clientSecret string, certificate string, ...) *Client + func NewClientWithConf(config *AuthConfig) *Client + func (c *Client) AddAdapter(adapter *Adapter) (bool, error) + func (c *Client) AddApplication(application *Application) (bool, error) + func (c *Client) AddCert(cert *Cert) (bool, error) + func (c *Client) AddEnforcer(enforcer *Enforcer) (bool, error) + func (c *Client) AddGroup(group *Group) (bool, error) + func (c *Client) AddModel(model *Model) (bool, error) + func (c *Client) AddOrganization(organization *Organization) (bool, error) + func (c *Client) AddPayment(payment *Payment) (bool, error) + func (c *Client) AddPermission(permission *Permission) (bool, error) + func (c *Client) AddPlan(plan *Plan) (bool, error) + func (c *Client) AddPolicy(enforcer *Enforcer, policy *CasbinRule) (bool, error) + func (c *Client) AddPricing(pricing *Pricing) (bool, error) + func (c *Client) AddProduct(product *Product) (bool, error) + func (c *Client) AddProvider(provider *Provider) (bool, error) + func (c *Client) AddRecord(record *Record) (bool, error) + func (c *Client) AddRole(role *Role) (bool, error) + func (c *Client) AddSession(session *Session) (bool, error) + func (c *Client) AddSubscription(subscription *Subscription) (bool, error) + func (c *Client) AddSyncer(syncer *Syncer) (bool, error) + func (c *Client) AddToken(token *Token) (bool, error) + func (c *Client) AddTransaction(transaction *Transaction) (bool, error) + func (c *Client) AddUser(user *User) (bool, error) + func (c *Client) AddWebhook(webhook *Webhook) (bool, error) + func (c *Client) BatchEnforce(permissionId, modelId, resourceId string, casbinRequests []CasbinRequest) ([][]bool, error) + func (c *Client) BuyProduct(name string, providerName string) (*Product, error) + func (c *Client) CheckUserPassword(user *User) (bool, error) + func (c *Client) DeleteAdapter(adapter *Adapter) (bool, error) + func (c *Client) DeleteApplication(application *Application) (bool, error) + func (c *Client) DeleteCert(cert *Cert) (bool, error) + func (c *Client) DeleteEnforcer(enforcer *Enforcer) (bool, error) + func (c *Client) DeleteGroup(group *Group) (bool, error) + func (c *Client) DeleteModel(model *Model) (bool, error) + func (c *Client) DeleteOrganization(organization *Organization) (bool, error) + func (c *Client) DeletePayment(payment *Payment) (bool, error) + func (c *Client) DeletePermission(permission *Permission) (bool, error) + func (c *Client) DeletePlan(plan *Plan) (bool, error) + func (c *Client) DeletePricing(pricing *Pricing) (bool, error) + func (c *Client) DeleteProduct(product *Product) (bool, error) + func (c *Client) DeleteProvider(provider *Provider) (bool, error) + func (c *Client) DeleteResource(resource *Resource) (bool, error) + func (c *Client) DeleteRole(role *Role) (bool, error) + func (c *Client) DeleteSession(session *Session) (bool, error) + func (c *Client) DeleteSubscription(subscription *Subscription) (bool, error) + func (c *Client) DeleteSyncer(syncer *Syncer) (bool, error) + func (c *Client) DeleteToken(token *Token) (bool, error) + func (c *Client) DeleteTransaction(transaction *Transaction) (bool, error) + func (c *Client) DeleteUser(user *User) (bool, error) + func (c *Client) DeleteWebhook(webhook *Webhook) (bool, error) + func (c *Client) DoGetBytes(url string) ([]byte, error) + func (c *Client) DoGetBytesRaw(url string) ([]byte, error) + func (c *Client) DoGetResponse(url string) (*Response, error) + func (c *Client) DoPost(action string, queryMap map[string]string, postBytes []byte, ...) (*Response, error) + func (c *Client) DoPostBytesRaw(url string, contentType string, body io.Reader) ([]byte, error) + func (c *Client) Enforce(permissionId, modelId, resourceId string, casbinRequest CasbinRequest) (bool, error) + func (c *Client) GetAdapter(name string) (*Adapter, error) + func (c *Client) GetAdapters() ([]*Adapter, error) + func (c *Client) GetApplication(name string) (*Application, error) + func (c *Client) GetApplications() ([]*Application, error) + func (c *Client) GetCert(name string) (*Cert, error) + func (c *Client) GetCerts() ([]*Cert, error) + func (c *Client) GetEnforcer(name string) (*Enforcer, error) + func (c *Client) GetEnforcers() ([]*Enforcer, error) + func (c *Client) GetGlobalCerts() ([]*Cert, error) + func (c *Client) GetGlobalUsers() ([]*User, error) + func (c *Client) GetGroup(name string) (*Group, error) + func (c *Client) GetGroups() ([]*Group, error) + func (c *Client) GetId(name string) string + func (c *Client) GetModel(name string) (*Model, error) + func (c *Client) GetModels() ([]*Model, error) + func (c *Client) GetMyProfileUrl(accessToken string) string + func (c *Client) GetOAuthToken(code string, state string) (*oauth2.Token, error) + func (c *Client) GetOrganization(name string) (*Organization, error) + func (c *Client) GetOrganizationApplications() ([]*Application, error) + func (c *Client) GetOrganizationNames() ([]*Organization, error) + func (c *Client) GetOrganizations() ([]*Organization, error) + func (c *Client) GetPaginationAdapters(p int, pageSize int, queryMap map[string]string) ([]*Adapter, int, error) + func (c *Client) GetPaginationEnforcers(p int, pageSize int, queryMap map[string]string) ([]*Enforcer, int, error) + func (c *Client) GetPaginationGroups(p int, pageSize int, queryMap map[string]string) ([]*Group, int, error) + func (c *Client) GetPaginationModels(p int, pageSize int, queryMap map[string]string) ([]*Model, int, error) + func (c *Client) GetPaginationPayments(p int, pageSize int, queryMap map[string]string) ([]*Payment, int, error) + func (c *Client) GetPaginationPermissions(p int, pageSize int, queryMap map[string]string) ([]*Permission, int, error) + func (c *Client) GetPaginationPlans(p int, pageSize int, queryMap map[string]string) ([]*Plan, int, error) + func (c *Client) GetPaginationPricings(p int, pageSize int, queryMap map[string]string) ([]*Pricing, int, error) + func (c *Client) GetPaginationProducts(p int, pageSize int, queryMap map[string]string) ([]*Product, int, error) + func (c *Client) GetPaginationProviders(p int, pageSize int, queryMap map[string]string) ([]*Provider, int, error) + func (c *Client) GetPaginationRecords(p int, pageSize int, queryMap map[string]string) ([]*Record, int, error) + func (c *Client) GetPaginationResources(owner, user, field, value string, pageSize, page int, ...) ([]*Resource, error) + func (c *Client) GetPaginationRoles(p int, pageSize int, queryMap map[string]string) ([]*Role, int, error) + func (c *Client) GetPaginationSessions(p int, pageSize int, queryMap map[string]string) ([]*Session, int, error) + func (c *Client) GetPaginationSubscriptions(p int, pageSize int, queryMap map[string]string) ([]*Subscription, int, error) + func (c *Client) GetPaginationSyncers(p int, pageSize int, queryMap map[string]string) ([]*Syncer, int, error) + func (c *Client) GetPaginationTokens(p int, pageSize int, queryMap map[string]string) ([]*Token, int, error) + func (c *Client) GetPaginationTransactions(p int, pageSize int, queryMap map[string]string) ([]*Transaction, int, error) + func (c *Client) GetPaginationUsers(p int, pageSize int, queryMap map[string]string) ([]*User, int, error) + func (c *Client) GetPaginationWebhooks(p int, pageSize int, queryMap map[string]string) ([]*Webhook, int, error) + func (c *Client) GetPayment(name string) (*Payment, error) + func (c *Client) GetPayments() ([]*Payment, error) + func (c *Client) GetPermission(name string) (*Permission, error) + func (c *Client) GetPermissions() ([]*Permission, error) + func (c *Client) GetPermissionsByRole(name string) ([]*Permission, error) + func (c *Client) GetPlan(name string) (*Plan, error) + func (c *Client) GetPlans() ([]*Plan, error) + func (c *Client) GetPolicies(enforcerName string, adapterId string) ([]*CasbinRule, error) + func (c *Client) GetPricing(name string) (*Pricing, error) + func (c *Client) GetPricings() ([]*Pricing, error) + func (c *Client) GetProduct(name string) (*Product, error) + func (c *Client) GetProducts() ([]*Product, error) + func (c *Client) GetProvider(name string) (*Provider, error) + func (c *Client) GetProviders() ([]*Provider, error) + func (c *Client) GetRecord(name string) (*Record, error) + func (c *Client) GetRecords() ([]*Record, error) + func (c *Client) GetResource(id string) (*Resource, error) + func (c *Client) GetResourceEx(owner, name string) (*Resource, error) + func (c *Client) GetResources(owner, user, field, value, sortField, sortOrder string) ([]*Resource, error) + func (c *Client) GetRole(name string) (*Role, error) + func (c *Client) GetRoles() ([]*Role, error) + func (c *Client) GetSession(name string, application string) (*Session, error) + func (c *Client) GetSessions() ([]*Session, error) + func (c *Client) GetSigninUrl(redirectUri string) string + func (c *Client) GetSignupUrl(enablePassword bool, redirectUri string) string + func (c *Client) GetSortedUsers(sorter string, limit int) ([]*User, error) + func (c *Client) GetSubscription(name string) (*Subscription, error) + func (c *Client) GetSubscriptions() ([]*Subscription, error) + func (c *Client) GetSyncer(name string) (*Syncer, error) + func (c *Client) GetSyncers() ([]*Syncer, error) + func (c *Client) GetToken(name string) (*Token, error) + func (c *Client) GetTokens() ([]*Token, error) + func (c *Client) GetTransaction(name string) (*Transaction, error) + func (c *Client) GetTransactions() ([]*Transaction, error) + func (c *Client) GetUrl(action string, queryMap map[string]string) string + func (c *Client) GetUser(name string) (*User, error) + func (c *Client) GetUserByEmail(email string) (*User, error) + func (c *Client) GetUserByPhone(phone string) (*User, error) + func (c *Client) GetUserByUserId(userId string) (*User, error) + func (c *Client) GetUserCount(isOnline string) (int, error) + func (c *Client) GetUserPayments(userName string) ([]*Payment, error) + func (c *Client) GetUserProfileUrl(userName string, accessToken string) string + func (c *Client) GetUserTransactions(userName string) ([]*Transaction, error) + func (c *Client) GetUsers() ([]*User, error) + func (c *Client) GetWebhook(name string) (*Webhook, error) + func (c *Client) GetWebhooks() ([]*Webhook, error) + func (c *Client) IntrospectToken(token, tokenTypeHint string) (result *IntroSpectTokenResult, err error) + func (c *Client) InvoicePayment(payment *Payment) (bool, error) + func (c *Client) NotifyPayment(payment *Payment) (bool, error) + func (c *Client) ParseJwtToken(token string) (*Claims, error) + func (c *Client) RefreshOAuthToken(refreshToken string) (*oauth2.Token, error) + func (c *Client) RemovePolicy(enforcer *Enforcer, policy *CasbinRule) (bool, error) + func (c *Client) SendEmail(title string, content string, sender string, receivers ...string) error + func (c *Client) SendSms(content string, receivers ...string) error + func (c *Client) SetPassword(owner, name, oldPassword, newPassword string) (bool, error) + func (c *Client) UpdateAdapter(adapter *Adapter) (bool, error) + func (c *Client) UpdateApplication(application *Application) (bool, error) + func (c *Client) UpdateCert(cert *Cert) (bool, error) + func (c *Client) UpdateEnforcer(enforcer *Enforcer) (bool, error) + func (c *Client) UpdateGroup(group *Group) (bool, error) + func (c *Client) UpdateModel(model *Model) (bool, error) + func (c *Client) UpdateOrganization(organization *Organization) (bool, error) + func (c *Client) UpdatePayment(payment *Payment) (bool, error) + func (c *Client) UpdatePermission(permission *Permission) (bool, error) + func (c *Client) UpdatePermissionForColumns(permission *Permission, columns []string) (bool, error) + func (c *Client) UpdatePlan(plan *Plan) (bool, error) + func (c *Client) UpdatePolicy(enforcer *Enforcer, oldpolicy *CasbinRule, newpolicy *CasbinRule) (bool, error) + func (c *Client) UpdatePricing(pricing *Pricing) (bool, error) + func (c *Client) UpdateProduct(product *Product) (bool, error) + func (c *Client) UpdateProvider(provider *Provider) (bool, error) + func (c *Client) UpdateRole(role *Role) (bool, error) + func (c *Client) UpdateRoleForColumns(role *Role, columns []string) (bool, error) + func (c *Client) UpdateSession(session *Session) (bool, error) + func (c *Client) UpdateSessionForColumns(session *Session, columns []string) (bool, error) + func (c *Client) UpdateSubscription(subscription *Subscription) (bool, error) + func (c *Client) UpdateSyncer(syncer *Syncer) (bool, error) + func (c *Client) UpdateToken(token *Token) (bool, error) + func (c *Client) UpdateTokenForColumns(token *Token, columns []string) (bool, error) + func (c *Client) UpdateTransaction(transaction *Transaction) (bool, error) + func (c *Client) UpdateUser(user *User) (bool, error) + func (c *Client) UpdateUserById(id string, user *User) (bool, error) + func (c *Client) UpdateUserForColumns(user *User, columns []string) (bool, error) + func (c *Client) UpdateWebhook(webhook *Webhook) (bool, error) + func (c *Client) UploadResource(user string, tag string, parent string, fullFilePath string, fileBytes []byte) (string, string, error) + func (c *Client) UploadResourceEx(user string, tag string, parent string, fullFilePath string, fileBytes []byte, ...) (string, string, error) + type Enforcer struct + Adapter string + CreatedTime string + Description string + DisplayName string + IsEnabled bool + Model string + Name string + Owner string + UpdatedTime string + func GetEnforcer(name string) (*Enforcer, error) + func GetEnforcers() ([]*Enforcer, error) + func GetPaginationEnforcers(p int, pageSize int, queryMap map[string]string) ([]*Enforcer, int, error) + type Group struct + Children []*Group + ContactEmail string + CreatedTime string + DisplayName string + IsEnabled bool + IsTopGroup bool + Key string + Manager string + Name string + Owner string + ParentId string + Title string + Type string + UpdatedTime string + Users []*User + func GetGroup(name string) (*Group, error) + func GetGroups() ([]*Group, error) + func GetPaginationGroups(p int, pageSize int, queryMap map[string]string) ([]*Group, int, error) + type HttpClient interface + Do func(*http.Request) (*http.Response, error) + type IntroSpectTokenResult struct + Active bool + Aud []string + ClientId string + Exp uint + Iat uint + Iss string + Jti string + Nbf uint + Sub uuid.UUID + TokenType string + Username string + type ManagedAccount struct + Application string + Password string + SigninUrl string + Username string + type MfaItem struct + Name string + Rule string + type MfaProps struct + CountryCode string + Enabled bool + IsPreferred bool + MfaType string + RecoveryCodes []string + Secret string + URL string + type Model struct + Children []*Model + ContactEmail string + CreatedTime string + DisplayName string + IsEnabled bool + IsTopModel bool + Key string + Manager string + ModelText string + Name string + Owner string + ParentId string + Title string + Type string + UpdatedTime string + Users []*User + func GetModel(name string) (*Model, error) + func GetModels() ([]*Model, error) + func GetPaginationModels(p int, pageSize int, queryMap map[string]string) ([]*Model, int, error) + type Organization struct + AccountItems []*AccountItem + CountryCodes []string + CreatedTime string + DefaultApplication string + DefaultAvatar string + DisplayName string + EnableSoftDeletion bool + Favicon string + InitScore int + IsProfilePublic bool + Languages []string + MasterPassword string + MfaItems []*MfaItem + Name string + Owner string + PasswordOptions []string + PasswordSalt string + PasswordType string + Tags []string + ThemeData *ThemeData + WebsiteUrl string + func GetOrganization(name string) (*Organization, error) + func GetOrganizationNames() ([]*Organization, error) + func GetOrganizations() ([]*Organization, error) + type Payment struct + CreatedTime string + Currency string + Detail string + DisplayName string + InvoiceRemark string + InvoiceTaxId string + InvoiceTitle string + InvoiceType string + InvoiceUrl string + Message string + Name string + OutOrderId string + Owner string + PayUrl string + PersonEmail string + PersonIdCard string + PersonName string + PersonPhone string + Price float64 + ProductDisplayName string + ProductName string + Provider string + ReturnUrl string + State string + Tag string + Type string + User string + func GetPaginationPayments(p int, pageSize int, queryMap map[string]string) ([]*Payment, int, error) + func GetPayment(name string) (*Payment, error) + func GetPayments() ([]*Payment, error) + func GetUserPayments(userName string) ([]*Payment, error) + type Permission struct + Actions []string + Adapter string + ApproveTime string + Approver string + CreatedTime string + Description string + DisplayName string + Domains []string + Effect string + Groups []string + IsEnabled bool + Model string + Name string + Owner string + ResourceType string + Resources []string + Roles []string + State string + Submitter string + Users []string + func GetPaginationPermissions(p int, pageSize int, queryMap map[string]string) ([]*Permission, int, error) + func GetPermission(name string) (*Permission, error) + func GetPermissions() ([]*Permission, error) + func GetPermissionsByRole(name string) ([]*Permission, error) + type PermissionRule struct + Id string + Ptype string + V0 string + V1 string + V2 string + V3 string + V4 string + V5 string + type Plan struct + CreatedTime string + Currency string + Description string + DisplayName string + IsEnabled bool + Name string + Options []string + Owner string + PricePerMonth float64 + PricePerYear float64 + Role string + func GetPaginationPlans(p int, pageSize int, queryMap map[string]string) ([]*Plan, int, error) + func GetPlan(name string) (*Plan, error) + func GetPlans() ([]*Plan, error) + type Pricing struct + Application string + ApproveTime string + Approver string + CreatedTime string + Description string + DisplayName string + IsEnabled bool + Name string + Owner string + Plans []string + State string + Submitter string + TrialDuration int + func GetPaginationPricings(p int, pageSize int, queryMap map[string]string) ([]*Pricing, int, error) + func GetPricing(name string) (*Pricing, error) + func GetPricings() ([]*Pricing, error) + type Product struct + CreatedTime string + Currency string + Description string + Detail string + DisplayName string + Image string + Name string + Owner string + Price float64 + ProviderObjs []*Provider + Providers []string + Quantity int + ReturnUrl string + Sold int + State string + Tag string + func BuyProduct(name string, providerName string) (*Product, error) + func GetPaginationProducts(p int, pageSize int, queryMap map[string]string) ([]*Product, int, error) + func GetProduct(name string) (*Product, error) + func GetProducts() ([]*Product, error) + type Provider struct + AppId string + Bucket string + Category string + Cert string + ClientId string + ClientId2 string + ClientSecret string + ClientSecret2 string + Content string + CreatedTime string + CustomAuthUrl string + CustomLogo string + CustomTokenUrl string + CustomUserInfoUrl string + DisableSsl bool + DisplayName string + Domain string + EnableSignAuthnRequest bool + Endpoint string + Host string + IdP string + IntranetEndpoint string + IssuerUrl string + Metadata string + Method string + Name string + Owner string + PathPrefix string + Port int + ProviderUrl string + Receiver string + RegionId string + Scopes string + SignName string + SubType string + TemplateCode string + Title string + Type string + UserMapping map[string]string + func GetPaginationProviders(p int, pageSize int, queryMap map[string]string) ([]*Provider, int, error) + func GetProvider(name string) (*Provider, error) + func GetProviders() ([]*Provider, error) + type ProviderItem struct + AlertType string + CanSignIn bool + CanSignUp bool + CanUnlink bool + Name string + Owner string + Prompted bool + Provider *Provider + Rule string + type Record struct + Action string + ClientIp string + CreatedTime string + ExtendedUser *User + Id int + IsTriggered bool + Method string + Name string + Object string + Organization string + Owner string + RequestUri string + User string + func GetPaginationRecords(p int, pageSize int, queryMap map[string]string) ([]*Record, int, error) + func GetRecord(name string) (*Record, error) + func GetRecords() ([]*Record, error) + type Resource struct + Application string + CreatedTime string + Description string + FileFormat string + FileName string + FileSize int + FileType string + Name string + Owner string + Parent string + Provider string + Tag string + Url string + User string + func GetPaginationResources(owner, user, field, value string, pageSize, page int, ...) ([]*Resource, error) + func GetResource(id string) (*Resource, error) + func GetResourceEx(owner, name string) (*Resource, error) + func GetResources(owner, user, field, value, sortField, sortOrder string) ([]*Resource, error) + type Response struct + Data interface{} + Data2 interface{} + Msg string + Status string + func DoGetResponse(url string) (*Response, error) + func DoPost(action string, queryMap map[string]string, postBytes []byte, ...) (*Response, error) + type Role struct + CreatedTime string + Description string + DisplayName string + Domains []string + IsEnabled bool + Name string + Owner string + Roles []string + Users []string + func GetPaginationRoles(p int, pageSize int, queryMap map[string]string) ([]*Role, int, error) + func GetRole(name string) (*Role, error) + func GetRoles() ([]*Role, error) + type Session struct + Application string + CreatedTime string + Name string + Owner string + SessionId []string + func GetPaginationSessions(p int, pageSize int, queryMap map[string]string) ([]*Session, int, error) + func GetSession(name string, application string) (*Session, error) + func GetSessions() ([]*Session, error) + type SignupItem struct + Name string + Prompted bool + Required bool + Rule string + Visible bool + type Subscription struct + ApproveTime string + Approver string + CreatedTime string + Description string + DisplayName string + Duration int + EndDate time.Time + IsEnabled bool + Name string + Owner string + Plan string + StartDate time.Time + State string + Submitter string + User string + func GetPaginationSubscriptions(p int, pageSize int, queryMap map[string]string) ([]*Subscription, int, error) + func GetSubscription(name string) (*Subscription, error) + func GetSubscriptions() ([]*Subscription, error) + type Syncer struct + AffiliationTable string + AvatarBaseUrl string + CreatedTime string + Database string + DatabaseType string + ErrorText string + Host string + IsEnabled bool + IsReadOnly bool + Name string + Organization string + Owner string + Password string + Port int + SyncInterval int + Table string + TableColumns []*TableColumn + TablePrimaryKey string + Type string + User string + func GetPaginationSyncers(p int, pageSize int, queryMap map[string]string) ([]*Syncer, int, error) + func GetSyncer(name string) (*Syncer, error) + func GetSyncers() ([]*Syncer, error) + type TableColumn struct + CasdoorName string + IsHashed bool + IsKey bool + Name string + Type string + Values []string + type ThemeData struct + BorderRadius int + ColorPrimary string + IsCompact bool + IsEnabled bool + ThemeType string + type Token struct + AccessToken string + Application string + Code string + CodeChallenge string + CodeExpireIn int64 + CodeIsUsed bool + CreatedTime string + ExpiresIn int + Name string + Organization string + Owner string + RefreshToken string + Scope string + TokenType string + User string + func GetPaginationTokens(p int, pageSize int, queryMap map[string]string) ([]*Token, int, error) + func GetToken(name string) (*Token, error) + func GetTokens() ([]*Token, error) + type Transaction struct + Amount float64 + Application string + Category string + CreatedTime string + Currency string + Detail string + DisplayName string + Name string + Owner string + Payment string + ProductDisplayName string + ProductName string + Provider string + ReturnUrl string + State string + Tag string + Type string + User string + func GetPaginationTransactions(p int, pageSize int, queryMap map[string]string) ([]*Transaction, int, error) + func GetTransaction(name string) (*Transaction, error) + func GetTransactions() ([]*Transaction, error) + func GetUserTransactions(userName string) ([]*Transaction, error) + type User struct + AccessKey string + AccessSecret string + Address []string + Adfs string + Affiliation string + Alipay string + Amazon string + Apple string + Auth0 string + Avatar string + AvatarType string + AzureAD string + Baidu string + BattleNet string + Bilibili string + Bio string + Birthday string + Bitbucket string + Box string + Casdoor string + CloudFoundry string + CountryCode string + CreatedIp string + CreatedTime string + Custom string + Dailymotion string + Deezer string + DigitalOcean string + DingTalk string + Discord string + DisplayName string + Douyin string + Dropbox string + Education string + Email string + EmailVerified bool + EveOnline string + Facebook string + FirstName string + Fitbit string + Gender string + GitHub string + Gitea string + Gitee string + Gitlab string + Google string + Groups []string + Hash string + Heroku string + Homepage string + Id string + IdCard string + IdCardType string + InfluxCloud string + Infoflow string + Instagram string + Intercom string + IsAdmin bool + IsDefaultAvatar bool + IsDeleted bool + IsForbidden bool + IsOnline bool + Kakao string + Karma int + Language string + Lark string + LastName string + LastSigninIp string + LastSigninTime string + LastSigninWrongTime string + Lastfm string + Ldap string + Line string + LinkedIn string + Location string + Mailru string + ManagedAccounts []ManagedAccount + Meetup string + MetaMask string + MfaEmailEnabled bool + MfaPhoneEnabled bool + MicrosoftOnline string + Name string + Naver string + Nextcloud string + Okta string + OneDrive string + Oura string + Owner string + Password string + PasswordSalt string + PasswordType string + Patreon string + Paypal string + PermanentAvatar string + Permissions []*Permission + Phone string + PreHash string + PreferredMfaType string + Properties map[string]string + QQ string + Ranking int + RecoveryCodes []string + Region string + Roles []*Role + SalesForce string + Score int + Shopify string + SigninWrongTimes int + SignupApplication string + Slack string + Soundcloud string + Spotify string + Steam string + Strava string + Stripe string + Tag string + TikTok string + Title string + TotpSecret string + Tumblr string + Twitch string + Twitter string + Type string + Typetalk string + Uber string + UpdatedTime string + VK string + WeChat string + Web3Onboard string + Wecom string + Weibo string + Wepay string + Xero string + Yahoo string + Yammer string + Yandex string + Zoom string + func GetGlobalUsers() ([]*User, error) + func GetPaginationUsers(p int, pageSize int, queryMap map[string]string) ([]*User, int, error) + func GetSortedUsers(sorter string, limit int) ([]*User, error) + func GetUser(name string) (*User, error) + func GetUserByEmail(email string) (*User, error) + func GetUserByPhone(phone string) (*User, error) + func GetUserByUserId(userId string) (*User, error) + func GetUsers() ([]*User, error) + func (u User) GetId() string + type Userinfo struct + Address string + Aud string + Avatar string + DisplayName string + Email string + Groups []string + Iss string + Name string + Phone string + Sub string + type Webhook struct + AffiliationTable string + AvatarBaseUrl string + CreatedTime string + Database string + DatabaseType string + ErrorText string + Host string + IsEnabled bool + IsReadOnly bool + Name string + Organization string + Owner string + Password string + Port int + SyncInterval int + Table string + TableColumns []*TableColumn + TablePrimaryKey string + Type string + User string + func GetPaginationWebhooks(p int, pageSize int, queryMap map[string]string) ([]*Webhook, int, error) + func GetWebhook(name string) (*Webhook, error) + func GetWebhooks() ([]*Webhook, error)