Documentation
¶
Index ¶
- type ApiConfig
- type ApiServer
- func (s *ApiServer) AccountExIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) AccountIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) AddAccountIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ApplyInboundIDIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ApplyInboundIPIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ApplyMinerSbuIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) BlocksIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ChangeAccessIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ChangeAlarmIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ChangeDescIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ChangePasswordIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) CheckJwtToken(r *http.Request, requestURI string) (bool, string)
- func (s *ApiServer) CreateToken(devId, access string, expirationMin int64) (string, error)
- func (s *ApiServer) CreateUserToken(id, access string, expirationMin int64) (string, error)
- func (s *ApiServer) DelAccounIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) DelIDboundIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) DelInboundIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) DelSubIdIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) DevIdInboundListIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ErrorWrite(w http.ResponseWriter, errorStr string)
- func (s *ApiServer) GetAccountListIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) GetLikeDevSubListIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) GetTokenIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) Health(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) InboundListIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) MinersIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) PaymentsIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) PayoutLimitIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) RedisMessage(payload string)
- func (s *ApiServer) SaveDevIdInboundIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) SaveInboundIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) SaveSubIdIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) ServerError(w http.ResponseWriter, r *http.Request, errMsg string)
- func (s *ApiServer) SignInIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) SignupIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) Start()
- func (s *ApiServer) StatsIndex(w http.ResponseWriter, r *http.Request)
- func (s *ApiServer) TokenValid(accessToken string) (*jwt.Token, error)
- func (s *ApiServer) VerifyToken(accessToken string) (*jwt.Token, error)
- func (s *ApiServer) WirteResponseData(w http.ResponseWriter, status int, format string, v ...interface{})
- type DbIPInbound
- type DevSubList
- type Entry
- type User
- type UserToken
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiConfig ¶
type ApiConfig struct {
Enabled bool `json:"enabled"`
Listen string `json:"listen"`
PoolChartsNum int64 `json:"poolChartsNum"`
MinerChartsNum int64 `json:"minerChartsNum"`
PoolChartInterval string `json:"poolChartInterval"`
MinerChartCheckInterval string `json:"minerChartCheckInterval"`
MinerChartInterval string `json:"minerChartInterval"`
DeleteCheckInterval string `json:"deleteCheckInterval"`
DeleteMaxRecord int64 `json:"deleteMaxRecord"`
DeleteKeepRecord int64 `json:"deleteKeepRecord"`
MinerPoolTimeout string `json:"minerPoolTimeout"`
StatsCollectInterval string `json:"statsCollectInterval"`
HashrateWindow string `json:"hashrateWindow"`
HashrateLargeWindow string `json:"hashrateLargeWindow"`
LuckWindow []int `json:"luckWindow"`
Payments int64 `json:"payments"`
Blocks int64 `json:"blocks"`
PurgeOnly bool `json:"purgeOnly"`
PurgeInterval string `json:"purgeInterval"`
AllowedOrigins []string `json:"AllowedOrigins"`
Coin string
Name string
Depth int64
Alarm *alarm.Config `json:"alarm"`
// In Shannon
Threshold int64 `json:"threshold"`
AccessSecret string `json:"AccessSecret"`
}
type ApiServer ¶
type ApiServer struct {
// contains filtered or unexported fields
}
func NewApiServer ¶
func (*ApiServer) AccountExIndex ¶
func (s *ApiServer) AccountExIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) AccountIndex ¶
func (s *ApiServer) AccountIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) AddAccountIndex ¶
func (s *ApiServer) AddAccountIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ApplyInboundIDIndex ¶
func (s *ApiServer) ApplyInboundIDIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ApplyInboundIPIndex ¶
func (s *ApiServer) ApplyInboundIPIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ApplyMinerSbuIndex ¶
func (s *ApiServer) ApplyMinerSbuIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) BlocksIndex ¶
func (s *ApiServer) BlocksIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ChangeAccessIndex ¶
func (s *ApiServer) ChangeAccessIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ChangeAlarmIndex ¶
func (s *ApiServer) ChangeAlarmIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ChangeDescIndex ¶
func (s *ApiServer) ChangeDescIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ChangePasswordIndex ¶
func (s *ApiServer) ChangePasswordIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) CheckJwtToken ¶
func (*ApiServer) CreateToken ¶
func (*ApiServer) CreateUserToken ¶
func (*ApiServer) DelAccounIndex ¶
func (s *ApiServer) DelAccounIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) DelIDboundIndex ¶
func (s *ApiServer) DelIDboundIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) DelInboundIndex ¶
func (s *ApiServer) DelInboundIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) DelSubIdIndex ¶
func (s *ApiServer) DelSubIdIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) DevIdInboundListIndex ¶
func (s *ApiServer) DevIdInboundListIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ErrorWrite ¶
func (s *ApiServer) ErrorWrite(w http.ResponseWriter, errorStr string)
func (*ApiServer) GetAccountListIndex ¶
func (s *ApiServer) GetAccountListIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) GetLikeDevSubListIndex ¶
func (s *ApiServer) GetLikeDevSubListIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) GetTokenIndex ¶
func (s *ApiServer) GetTokenIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) InboundListIndex ¶
func (s *ApiServer) InboundListIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) MinersIndex ¶
func (s *ApiServer) MinersIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) PaymentsIndex ¶
func (s *ApiServer) PaymentsIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) PayoutLimitIndex ¶
func (s *ApiServer) PayoutLimitIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) RedisMessage ¶
func (*ApiServer) SaveDevIdInboundIndex ¶
func (s *ApiServer) SaveDevIdInboundIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) SaveInboundIndex ¶
func (s *ApiServer) SaveInboundIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) SaveSubIdIndex ¶
func (s *ApiServer) SaveSubIdIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) ServerError ¶
func (*ApiServer) SignInIndex ¶
func (s *ApiServer) SignInIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) SignupIndex ¶
func (s *ApiServer) SignupIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) StatsIndex ¶
func (s *ApiServer) StatsIndex(w http.ResponseWriter, r *http.Request)
func (*ApiServer) TokenValid ¶
func (*ApiServer) VerifyToken ¶
func (*ApiServer) WirteResponseData ¶
func (s *ApiServer) WirteResponseData(w http.ResponseWriter, status int, format string, v ...interface{})
type DbIPInbound ¶
type DevSubList ¶
Click to show internal directories.
Click to hide internal directories.