Documentation ¶
Index ¶
- Constants
- Variables
- func Argument(d map[string]interface{}, name string) (string, bool)
- func ArgumentInteger(d map[string]interface{}, name string) (int, bool)
- func ArgumentIntegerMust(d map[string]interface{}, name string) int
- func ArgumentMust(d map[string]interface{}, name string) string
- func BuildNewClusterToken(clusterId int, clusterName string, cToken string) string
- func CalcMsReqSign(cId int, cToken string, ts int64) string
- func GetCookie(request *http.Request, name string) string
- func Md5Sum(data string) string
- type FbaseError
Constants ¶
View Source
const (
// MASTER_CLUSTER_FIXED_ID = 1
CLUSTER_FIXED_TOKEN = "test"
)
Variables ¶
View Source
var ( OK = &FbaseError{0, "success"} INTERNAL_ERROR = &FbaseError{1, "internal error"} DB_ERROR = &FbaseError{2, "db error"} HTTP_REQUEST_ERROR = &FbaseError{3, "send http request is failed"} PARSE_PARAM_ERROR = &FbaseError{4, "parse parameters error"} PARAM_FORMAT_ERROR = &FbaseError{5, "parameters format error"} CLUSTER_NOTEXISTS_ERROR = &FbaseError{6, "cluster not exists"} CLUSTER_DUPCREATE_ERROR = &FbaseError{7, "create duplicated cluster"} TABLE_NOT_EXISTS = &FbaseError{8, "table not exists"} NO_DATA = &FbaseError{9, "no data"} NO_RIGHT = &FbaseError{10, "no right, please contact sharkstore team"} NO_USER = &FbaseError{11, "please login retry"} )
Functions ¶
func ArgumentIntegerMust ¶
func ArgumentMust ¶
func BuildNewClusterToken ¶
集群1与其他集群签名规则一致
Types ¶
type FbaseError ¶
func (*FbaseError) Error ¶
func (e *FbaseError) Error() string
Click to show internal directories.
Click to hide internal directories.