Versions in this module Expand all Collapse all v0 v0.1.3 Feb 19, 2024 v0.1.2 Feb 19, 2024 v0.1.1 Feb 19, 2024 v0.1.0 Feb 19, 2024 v0.0.1 Feb 19, 2024 Changes in this version + type AccessControl struct + BlackList string + ClientIPFlowLimit int + ID int64 + OpenAuth int + ServiceFlowLimit int + ServiceID int64 + WhiteHostName string + WhiteList string + func (t *AccessControl) Find(c *gin.Context, tx *gorm.DB, search *AccessControl) (*AccessControl, error) + func (t *AccessControl) ListBYServiceID(c *gin.Context, tx *gorm.DB, serviceID int64) ([]AccessControl, int64, error) + func (t *AccessControl) Save(c *gin.Context, tx *gorm.DB) error + func (t *AccessControl) TableName() string + type Admin struct + CreatedAt time.Time + Id int + IsDelete int + Password string + Salt string + UpdatedAt time.Time + UserName string + func (a *Admin) Find(c *gin.Context, tx *gorm.DB, search *Admin) (*Admin, error) + func (a *Admin) LoginCheck(c *gin.Context, tx *gorm.DB, param *dto.AdminLoginInput) (*Admin, error) + func (a *Admin) Save(c *gin.Context, tx *gorm.DB) error + func (t *Admin) TableName() string + type App struct + AppID string + CreatedAt time.Time + ID int64 + IsDelete int8 + Name string + Qpd int64 + Qps int64 + Secret string + UpdatedAt time.Time + WhiteIPS string + func (a *App) Find(c *gin.Context, tx *gorm.DB, search *App) (*App, error) + func (a *App) PageList(c *gin.Context, tx *gorm.DB, search *dto.AppInfoListInput) ([]App, int64, error) + func (a *App) Save(c *gin.Context, tx *gorm.DB) error + func (t *App) TableName() string + type AppEvent struct + AddApp []*App + DeleteApp []*App + UpdateApp []*App + type AppManager struct + AppMap map[string]*App + AppSlice []*App + Observers map[AppObserver]bool + UpdateAt time.Time + var AppManagerHandler *AppManager + func NewAppManager() *AppManager + func (s *AppManager) Deregister(ob AppObserver) + func (s *AppManager) GetAppList() []*App + func (s *AppManager) LoadAndWatch() error + func (s *AppManager) LoadApp() *AppManager + func (s *AppManager) Notify(e *AppEvent) + func (s *AppManager) Register(ob AppObserver) + type AppObserver interface + Update func(*AppEvent) + type AppSubject interface + Deregister func(ServiceObserver) + Notify func(*AppEvent) + Register func(ServiceObserver) + type GrpcRule struct + HeaderTransfor string + ID int64 + Port int + ServiceID int64 + func (t *GrpcRule) Find(c *gin.Context, tx *gorm.DB, search *GrpcRule) (*GrpcRule, error) + func (t *GrpcRule) ListByServiceID(c *gin.Context, tx *gorm.DB, serviceID int64) ([]GrpcRule, int64, error) + func (t *GrpcRule) Save(c *gin.Context, tx *gorm.DB) error + func (t *GrpcRule) TableName() string + type HttpRule struct + HeaderTransfor string + ID int64 + NeedHttps int + NeedStripUri int + NeedWebsocket int + Rule string + RuleType int + ServiceID int64 + UrlRewrite string + func (t *HttpRule) Find(c *gin.Context, tx *gorm.DB, search *HttpRule) (*HttpRule, error) + func (t *HttpRule) ListByServiceID(c *gin.Context, tx *gorm.DB, serviceID int64) ([]HttpRule, int64, error) + func (t *HttpRule) Save(c *gin.Context, tx *gorm.DB) error + func (t *HttpRule) TableName() string + type LoadBalance struct + CheckInterval int + CheckMethod int + CheckTimeout int + ForbidList string + ID int64 + IpList string + RoundType int + ServiceID int64 + UpstreamConnectTimeout int + UpstreamHeaderTimeout int + UpstreamIdleTimeout int + UpstreamMaxIdle int + WeightList string + func (t *LoadBalance) Find(c *gin.Context, tx *gorm.DB, search *LoadBalance) (*LoadBalance, error) + func (t *LoadBalance) GetIPListByModel() []string + func (t *LoadBalance) GetWeightListByModel() []string + func (t *LoadBalance) Save(c *gin.Context, tx *gorm.DB) error + func (t *LoadBalance) TableName() string + type LoadBalancer struct + LoadBalanceMap map[string]*LoadBalancerItem + LoadBalanceSlice []*LoadBalancerItem + Locker sync.RWMutex + var LoadBalancerHandler *LoadBalancer + func NewLoadBalancer() *LoadBalancer + func (lbr *LoadBalancer) GetLoadBalancer(service *ServiceDetail) (load_balance.LoadBalance, error) + func (lbr *LoadBalancer) Update(e *ServiceEvent) + type LoadBalancerItem struct + LoadBalance load_balance.LoadBalance + ServiceName string + UpdatedAt time.Time + type ServiceDetail struct + AccessControl *AccessControl + GRPCRule *GrpcRule + HTTPRule *HttpRule + Info *ServiceInfo + LoadBalance *LoadBalance + TCPRule *TcpRule + type ServiceEvent struct + AddService []*ServiceDetail + DeleteService []*ServiceDetail + UpdateService []*ServiceDetail + type ServiceInfo struct + CreatedAt time.Time + ID int64 + IsDelete int + LoadType int + ServiceDesc string + ServiceName string + UpdatedAt time.Time + func (a *ServiceInfo) Find(c *gin.Context, tx *gorm.DB, search *ServiceInfo) (*ServiceInfo, error) + func (a *ServiceInfo) Save(c *gin.Context, tx *gorm.DB) error + func (s *ServiceInfo) GroupByLoadType(c *gin.Context, tx *gorm.DB) ([]dto.DashServiceStatItemOutput, error) + func (s *ServiceInfo) PageList(c *gin.Context, tx *gorm.DB, param *dto.ServiceInfoInput) ([]ServiceInfo, int64, error) + func (t *ServiceInfo) ServiceDetail(c *gin.Context, tx *gorm.DB, search *ServiceInfo) (*ServiceDetail, error) + func (t *ServiceInfo) TableName() string + type ServiceManager struct + Observers map[ServiceObserver]bool + ServiceMap map[string]*ServiceDetail + ServiceSlice []*ServiceDetail + UpdateAt time.Time + var ServiceManagerHandler *ServiceManager + func NewServiceManager() *ServiceManager + func (s *ServiceManager) Deregister(ob ServiceObserver) + func (s *ServiceManager) GetGrpcServiceList() []*ServiceDetail + func (s *ServiceManager) GetTcpServiceList() []*ServiceDetail + func (s *ServiceManager) HttpAccessMode(c *gin.Context) (*ServiceDetail, error) + func (s *ServiceManager) LoadAndWatch() error + func (s *ServiceManager) LoadService() *ServiceManager + func (s *ServiceManager) Notify(e *ServiceEvent) + func (s *ServiceManager) Register(ob ServiceObserver) + type ServiceObserver interface + Update func(*ServiceEvent) + type ServiceSubject interface + Deregister func(ServiceObserver) + Notify func(*ServiceEvent) + Register func(ServiceObserver) + type TcpRule struct + ID int64 + Port int + ServiceID int64 + func (t *TcpRule) Find(c *gin.Context, tx *gorm.DB, search *TcpRule) (*TcpRule, error) + func (t *TcpRule) ListByServiceID(c *gin.Context, tx *gorm.DB, serviceID int64) ([]TcpRule, int64, error) + func (t *TcpRule) Save(c *gin.Context, tx *gorm.DB) error + func (t *TcpRule) TableName() string + type TransportItem struct + ServiceName string + Trans *http.Transport + UpdateAt time.Time + type Transportor struct + Locker sync.Locker + TransportMap map[string]*TransportItem + TransportSlice []*TransportItem + var TransportorHandler *Transportor + func NewTransportor() *Transportor + func (t *Transportor) GetTransportor(service *ServiceDetail) (*http.Transport, error) + func (t *Transportor) Update(e *ServiceEvent)