Versions in this module Expand all Collapse all v0 v0.4.3 Jun 8, 2022 Changes in this version + func AddApplication(application *Application) (bool, error) + func AddOrganization(organization *Organization) (bool, error) + func AddUser(user *User) (bool, error) + func CheckUserPassword(user *User) (bool, error) + func DeleteApplication(name string) (bool, error) + func DeleteOrganization(name string) (bool, error) + func DeleteResource(name string) (bool, error) + func DeleteUser(user *User) (bool, error) + func DoGetBytes(url string) ([]byte, error) + func DoGetBytesRaw(url string) ([]byte, error) + 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, jwtPublicKey string, ...) + func RefreshOAuthToken(refreshToken string) (*oauth2.Token, error) + func SendEmail(title string, content string, sender string, receivers ...string) error + func SendSms(content string, receivers ...string) error + func UpdateApplication(application *Application) (bool, error) + func UpdateUser(user *User) (bool, error) + func UpdateUserForColumns(user *User, columns []string) (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 Application struct + AffiliationUrl string + Background string + Cert string + ClientId string + ClientSecret string + CreatedTime string + Description string + DisplayName string + EnableCodeSignin bool + EnablePassword bool + EnableSignUp bool + EnableSigninSession bool + ExpireInHours int + Favicon string + ForgetUrl string + HomeLogo string + HomepageUrl string + Logo string + Name string + Organization string + Owner string + RedirectUris []string + RefreshExpireInHours int + SigninHtml string + SigninUrl string + SignupHtml string + SignupUrl string + TermsOfUse string + Title string + TokenFormat string + func GetApplication(id string) (*Application, error) + type AuthConfig struct + ApplicationName string + ClientId string + ClientSecret string + Endpoint string + JwtPublicKey string + OrganizationName string + type Claims struct + AccessToken string + func ParseJwtToken(token string) (*Claims, error) + type Organization struct + CreatedTime string + DefaultAvatar string + DisplayName string + EnableSoftDeletion bool + Favicon string + MasterPassword string + Name string + Owner string + PasswordSalt string + PasswordType string + PhonePrefix string + WebsiteUrl string + type Permission struct + Action string + Actions []string + CreatedTime string + DisplayName string + Effect string + IsEnabled bool + Name string + Owner string + ResourceType string + Resources []string + Roles []string + Users []string + func GetPermission() ([]*Permission, error) + type Resource struct + Name string + Owner string + type Response struct + Data interface{} + Data2 interface{} + Msg string + Status string + func AddPermission(q Permission) (*Response, error) + type User struct + Address []string + Affiliation string + Avatar string + Bio string + Birthday string + CreatedIp string + CreatedTime string + DingTalk string + DisplayName string + Education string + Email string + Facebook string + Gender string + Gitee string + Github string + Gitlab string + Google string + Hash string + Homepage string + Id string + IdCard string + IdCardType string + IsAdmin bool + IsDefaultAvatar bool + IsDeleted bool + IsForbidden bool + IsGlobalAdmin bool + IsOnline bool + Karma int + Language string + Lark string + LastSigninIp string + LastSigninTime string + Ldap string + LinkedIn string + Location string + Name string + Owner string + Password string + PasswordSalt string + PermanentAvatar string + Phone string + PreHash string + Properties map[string]string + QQ string + Ranking int + Region string + Score int + SignupApplication string + Tag string + Title string + Type string + UpdatedTime string + WeChat string + Wecom string + Weibo string + func GetSortedUsers(sorter string, limit int) ([]*User, error) + func GetUser(name string) (*User, error) + func GetUserByEmail(email string) (*User, error) + func GetUsers() ([]*User, error)