Documentation ¶
Index ¶
- Constants
- func AdminCountUsers() (int64, error)
- func AdminCreateProxyConfig(proxyCfg *models.ProxyConfig) error
- func AdminGetAllProxyStats(tx *gorm.DB) ([]*models.ProxyStatsEntity, error)
- func AdminGetAllUsers() ([]*models.UserEntity, error)
- func AdminGetClientByClientID(clientID string) (*models.ClientEntity, error)
- func AdminGetClientIDsInShadowByClientID(clientID string) ([]string, error)
- func AdminGetProxyConfigByClientIDAndName(clientID string, name string) (*models.ProxyConfig, error)
- func AdminGetServerByServerID(serverID string) (*models.ServerEntity, error)
- func AdminGetTenantProxyStats(tenantID int) ([]*models.ProxyStatsEntity, error)
- func AdminListProxyConfigsWithFilters(filters *models.ProxyConfigEntity) ([]*models.ProxyConfig, error)
- func AdminMSaveTodyStats(tx *gorm.DB, s []*models.HistoryProxyStats) error
- func AdminSaveTodyStats(s *models.HistoryProxyStats) error
- func AdminUpdateProxyStats(srv *models.ServerEntity, inputs []*pb.ProxyInfo) error
- func CheckUserNameAndEmail(userName, email string) error
- func CheckUserPassword(userNameOrEmail, password string) (bool, models.UserInfo, error)
- func CountCerts() (int64, error)
- func CountClients(userInfo models.UserInfo) (int64, error)
- func CountClientsInShadow(userInfo models.UserInfo, clientID string) (int64, error)
- func CountClientsWithKeyword(userInfo models.UserInfo, keyword string) (int64, error)
- func CountConfiguredClients(userInfo models.UserInfo) (int64, error)
- func CountConfiguredServers(userInfo models.UserInfo) (int64, error)
- func CountProxyConfigs(userInfo models.UserInfo) (int64, error)
- func CountProxyConfigsWithFilters(userInfo models.UserInfo, filters *models.ProxyConfigEntity) (int64, error)
- func CountProxyConfigsWithFiltersAndKeyword(userInfo models.UserInfo, filters *models.ProxyConfigEntity, keyword string) (int64, error)
- func CountServers(userInfo models.UserInfo) (int64, error)
- func CountServersWithKeyword(userInfo models.UserInfo, keyword string) (int64, error)
- func CreateClient(userInfo models.UserInfo, client *models.ClientEntity) error
- func CreateProxyConfig(userInfo models.UserInfo, proxyCfg *models.ProxyConfigEntity) error
- func CreateServer(userInfo models.UserInfo, server *models.ServerEntity) error
- func CreateUser(user *models.UserEntity) error
- func DeleteClient(userInfo models.UserInfo, clientID string) error
- func DeleteProxyConfig(userInfo models.UserInfo, clientID, name string) error
- func DeleteProxyConfigsByClientID(userInfo models.UserInfo, clientID string) error
- func DeleteProxyConfigsByClientIDOrOriginClientID(userInfo models.UserInfo, clientID string) error
- func DeleteServer(userInfo models.UserInfo, serverID string) error
- func GenX509Info(template *x509.Certificate) (certPem []byte, keyPem []byte, err error)
- func GetAllClients(userInfo models.UserInfo) ([]*models.ClientEntity, error)
- func GetClientByClientID(userInfo models.UserInfo, clientID string) (*models.ClientEntity, error)
- func GetClientByFilter(userInfo models.UserInfo, client *models.ClientEntity, shadow *bool) (*models.ClientEntity, error)
- func GetClientByOriginClientID(originClientID string) (*models.ClientEntity, error)
- func GetClientIDsInShadowByClientID(userInfo models.UserInfo, clientID string) ([]string, error)
- func GetDefaultKeyPair() (keyPem []byte, certPem []byte, err error)
- func GetDefaultServer() (*models.ServerEntity, error)
- func GetHistoryStatsByClientID(userInfo models.UserInfo, clientID string) ([]*models.HistoryProxyStats, error)
- func GetHistoryStatsByProxyID(userInfo models.UserInfo, proxyID int) ([]*models.HistoryProxyStats, error)
- func GetHistoryStatsByServerID(userInfo models.UserInfo, serverID string) ([]*models.HistoryProxyStats, error)
- func GetProxyConfigByFilter(userInfo models.UserInfo, proxyConfig *models.ProxyConfigEntity) (*models.ProxyConfig, error)
- func GetProxyConfigByOriginClientIDAndName(userInfo models.UserInfo, clientID string, name string) (*models.ProxyConfig, error)
- func GetProxyConfigsByClientID(userInfo models.UserInfo, clientID string) ([]*models.ProxyConfigEntity, error)
- func GetProxyStatsByClientID(userInfo models.UserInfo, clientID string) ([]*models.ProxyStatsEntity, error)
- func GetProxyStatsByServerID(userInfo models.UserInfo, serverID string) ([]*models.ProxyStatsEntity, error)
- func GetServerByServerID(userInfo models.UserInfo, serverID string) (*models.ServerEntity, error)
- func GetUserByUserID(userID int) (*models.UserEntity, error)
- func GetUserByUserName(userName string) (*models.UserEntity, error)
- func InitCert(template *x509.Certificate) credentials.TransportCredentials
- func InitDefaultServer(serverIP string)
- func ListClients(userInfo models.UserInfo, page, pageSize int) ([]*models.ClientEntity, error)
- func ListClientsWithKeyword(userInfo models.UserInfo, page, pageSize int, keyword string) ([]*models.ClientEntity, error)
- func ListProxyConfigs(userInfo models.UserInfo, page, pageSize int) ([]*models.ProxyConfig, error)
- func ListProxyConfigsWithFilters(userInfo models.UserInfo, page, pageSize int, ...) ([]*models.ProxyConfig, error)
- func ListProxyConfigsWithFiltersAndKeyword(userInfo models.UserInfo, page, pageSize int, ...) ([]*models.ProxyConfig, error)
- func ListProxyConfigsWithKeyword(userInfo models.UserInfo, page, pageSize int, keyword string) ([]*models.ProxyConfig, error)
- func ListServers(userInfo models.UserInfo, page, pageSize int) ([]*models.ServerEntity, error)
- func ListServersWithKeyword(userInfo models.UserInfo, page, pageSize int, keyword string) ([]*models.ServerEntity, error)
- func RebuildProxyConfigFromClient(userInfo models.UserInfo, client *models.Client) error
- func UpdateClient(userInfo models.UserInfo, client *models.ClientEntity) error
- func UpdateDefaultServer(c *models.Server) error
- func UpdateProxyConfig(userInfo models.UserInfo, proxyCfg *models.ProxyConfig) error
- func UpdateServer(userInfo models.UserInfo, server *models.ServerEntity) error
- func UpdateUser(userInfo models.UserInfo, user *models.UserEntity) error
- func ValidateClientSecret(clientID, clientSecret string) (*models.ClientEntity, error)
- func ValidateServerSecret(serverID string, secret string) (*models.ServerEntity, error)
Constants ¶
View Source
const (
MSetBatchSize = 100
)
Variables ¶
This section is empty.
Functions ¶
func AdminCountUsers ¶
func AdminCreateProxyConfig ¶ added in v0.1.0
func AdminCreateProxyConfig(proxyCfg *models.ProxyConfig) error
func AdminGetAllProxyStats ¶ added in v0.1.0
func AdminGetAllProxyStats(tx *gorm.DB) ([]*models.ProxyStatsEntity, error)
func AdminGetAllUsers ¶
func AdminGetAllUsers() ([]*models.UserEntity, error)
func AdminGetClientByClientID ¶
func AdminGetClientByClientID(clientID string) (*models.ClientEntity, error)
func AdminGetClientIDsInShadowByClientID ¶ added in v0.1.0
func AdminGetProxyConfigByClientIDAndName ¶ added in v0.1.0
func AdminGetProxyConfigByClientIDAndName(clientID string, name string) (*models.ProxyConfig, error)
func AdminGetServerByServerID ¶
func AdminGetServerByServerID(serverID string) (*models.ServerEntity, error)
func AdminGetTenantProxyStats ¶ added in v0.1.0
func AdminGetTenantProxyStats(tenantID int) ([]*models.ProxyStatsEntity, error)
func AdminListProxyConfigsWithFilters ¶ added in v0.1.0
func AdminListProxyConfigsWithFilters(filters *models.ProxyConfigEntity) ([]*models.ProxyConfig, error)
func AdminMSaveTodyStats ¶ added in v0.0.31
func AdminMSaveTodyStats(tx *gorm.DB, s []*models.HistoryProxyStats) error
func AdminSaveTodyStats ¶ added in v0.0.31
func AdminSaveTodyStats(s *models.HistoryProxyStats) error
func AdminUpdateProxyStats ¶ added in v0.1.0
func AdminUpdateProxyStats(srv *models.ServerEntity, inputs []*pb.ProxyInfo) error
func CheckUserNameAndEmail ¶
func CheckUserPassword ¶
func CountCerts ¶
func CountClientsInShadow ¶ added in v0.1.0
func CountClientsWithKeyword ¶ added in v0.0.24
func CountProxyConfigs ¶ added in v0.1.0
func CountProxyConfigsWithFilters ¶ added in v0.1.0
func CountProxyConfigsWithFiltersAndKeyword ¶ added in v0.1.0
func CountServersWithKeyword ¶ added in v0.0.24
func CreateClient ¶
func CreateClient(userInfo models.UserInfo, client *models.ClientEntity) error
func CreateProxyConfig ¶ added in v0.1.0
func CreateProxyConfig(userInfo models.UserInfo, proxyCfg *models.ProxyConfigEntity) error
func CreateServer ¶
func CreateServer(userInfo models.UserInfo, server *models.ServerEntity) error
func CreateUser ¶
func CreateUser(user *models.UserEntity) error
func DeleteProxyConfig ¶ added in v0.1.0
func DeleteProxyConfigsByClientID ¶ added in v0.1.0
func DeleteProxyConfigsByClientIDOrOriginClientID ¶ added in v0.1.0
func GenX509Info ¶
func GenX509Info(template *x509.Certificate) (certPem []byte, keyPem []byte, err error)
func GetAllClients ¶
func GetAllClients(userInfo models.UserInfo) ([]*models.ClientEntity, error)
func GetClientByClientID ¶
func GetClientByFilter ¶ added in v0.1.0
func GetClientByFilter(userInfo models.UserInfo, client *models.ClientEntity, shadow *bool) (*models.ClientEntity, error)
func GetClientByOriginClientID ¶ added in v0.1.0
func GetClientByOriginClientID(originClientID string) (*models.ClientEntity, error)
func GetClientIDsInShadowByClientID ¶ added in v0.1.0
func GetDefaultKeyPair ¶
func GetDefaultServer ¶
func GetDefaultServer() (*models.ServerEntity, error)
func GetHistoryStatsByClientID ¶ added in v0.0.31
func GetHistoryStatsByProxyID ¶ added in v0.0.31
func GetHistoryStatsByServerID ¶ added in v0.0.31
func GetProxyConfigByFilter ¶ added in v0.1.0
func GetProxyConfigByFilter(userInfo models.UserInfo, proxyConfig *models.ProxyConfigEntity) (*models.ProxyConfig, error)
func GetProxyConfigByOriginClientIDAndName ¶ added in v0.1.0
func GetProxyConfigsByClientID ¶ added in v0.1.0
func GetProxyStatsByClientID ¶ added in v0.1.0
func GetProxyStatsByServerID ¶ added in v0.1.0
func GetServerByServerID ¶
func GetUserByUserID ¶
func GetUserByUserID(userID int) (*models.UserEntity, error)
func GetUserByUserName ¶
func GetUserByUserName(userName string) (*models.UserEntity, error)
func InitCert ¶
func InitCert(template *x509.Certificate) credentials.TransportCredentials
func InitDefaultServer ¶
func InitDefaultServer(serverIP string)
func ListClients ¶
func ListClientsWithKeyword ¶ added in v0.0.24
func ListProxyConfigs ¶ added in v0.1.0
func ListProxyConfigsWithFilters ¶ added in v0.1.0
func ListProxyConfigsWithFilters(userInfo models.UserInfo, page, pageSize int, filters *models.ProxyConfigEntity) ([]*models.ProxyConfig, error)
func ListProxyConfigsWithFiltersAndKeyword ¶ added in v0.1.0
func ListProxyConfigsWithFiltersAndKeyword(userInfo models.UserInfo, page, pageSize int, filters *models.ProxyConfigEntity, keyword string) ([]*models.ProxyConfig, error)
func ListProxyConfigsWithKeyword ¶ added in v0.1.0
func ListServers ¶
func ListServersWithKeyword ¶ added in v0.0.24
func RebuildProxyConfigFromClient ¶ added in v0.1.0
RebuildProxyConfigFromClient rebuild proxy from client
func UpdateClient ¶
func UpdateClient(userInfo models.UserInfo, client *models.ClientEntity) error
func UpdateDefaultServer ¶
func UpdateProxyConfig ¶ added in v0.1.0
func UpdateProxyConfig(userInfo models.UserInfo, proxyCfg *models.ProxyConfig) error
func UpdateServer ¶
func UpdateServer(userInfo models.UserInfo, server *models.ServerEntity) error
func UpdateUser ¶
func UpdateUser(userInfo models.UserInfo, user *models.UserEntity) error
func ValidateClientSecret ¶
func ValidateClientSecret(clientID, clientSecret string) (*models.ClientEntity, error)
func ValidateServerSecret ¶
func ValidateServerSecret(serverID string, secret string) (*models.ServerEntity, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.