model

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHash

func DefaultHash(plaintext string) string

DefaultHash hash a plain text using default salt.

Types

type AsoAccount

type AsoAccount struct {
	Mid            int64     `json:"mid"`
	UserID         string    `json:"userid"`
	Uname          string    `json:"uname"`
	Pwd            string    `json:"pwd"`
	Salt           string    `json:"salt"`
	Email          string    `json:"email"`
	Tel            string    `json:"tel"`
	CountryID      int64     `json:"country_id"`
	MobileVerified int8      `json:"mobile_verified"`
	Isleak         int8      `json:"isleak"`
	Ctime          time.Time `json:"ctime"`
	Mtime          time.Time `json:"mtime"`
}

AsoAccount aso account.

func Default

func Default(a *OriginAsoAccount) *AsoAccount

Default doHash aso account, including the followings fields: userid, uname, pwd, email, tel.

func (*AsoAccount) Equals

func (a *AsoAccount) Equals(b *AsoAccount) bool

Equals check equals.

type CompareProcStat

type CompareProcStat struct {
	StartTime     string       `json:"start_time"`
	EndTime       string       `json:"end_time"`
	StepDuration  JsonDuration `json:"step_duration"`
	LoopDuration  JsonDuration `json:"loop_duration"`
	DelayDuration JsonDuration `json:"delay_duration"`

	BatchSize           int `json:"batch_size"`
	BatchMissRetryCount int `json:"batch_miss_retry_count"`

	Debug bool `json:"debug"`
	Fix   bool `json:"fix"`

	CurrentRangeStart        JSONTime `json:"current_range_start"`
	CurrentRangeEnd          JSONTime `json:"current_range_end"`
	CurrentRangeRecordsCount int      `json:"current_range_records_count"`
	TotalRangeRecordsCount   int      `json:"total_range_records_count"`
	DiffCount                int      `json:"diff_count"`

	Sleeping           bool   `json:"sleeping"`
	SleepFrom          string `json:"sleep_from,omitempty"`
	SleepSeconds       int64  `json:"sleep_seconds,omitempty"`
	SleepRemainSeconds int64  `json:"sleep_remain_seconds,omitempty"`
}

CompareProcStat status of compare proc.

type CompareRes

type CompareRes struct {
	Flags          uint8             `json:"flag"`
	FlagsDesc      string            `json:"flags_desc"`
	Seq            int64             `json:"seq"`
	Local          *OriginAsoAccount `json:"local"`
	LocalEncrypted *AsoAccount       `json:"local_encrypted"`
	Cloud          *AsoAccount       `json:"cloud"`
}

CompareRes the result of comparing aso account between local and cloud.

type CountAndPercent

type CountAndPercent struct {
	DiffType string `json:"diff_type"`
	Count    int    `json:"count"`
	Percent  string `json:"percent"`
}

CountAndPercent count and percent.

type DiffParseResp

type DiffParseResp struct {
	Total            int                   `json:"total"`
	SeqAndPercents   []*SeqCountAndPercent `json:"seq_and_percents"`
	CountAndPercents []*CountAndPercent    `json:"count_and_percents"`
	CompareResList   []*CompareRes         `json:"compare_res_list"`
}

DiffParseResp diff parse resp.

type JSONTime

type JSONTime time.Time

func (JSONTime) MarshalJSON

func (t JSONTime) MarshalJSON() ([]byte, error)

type JsonDuration

type JsonDuration time.Duration

func (JsonDuration) MarshalJSON

func (t JsonDuration) MarshalJSON() ([]byte, error)

type Log

type Log struct {
	Log string `json:"log"`
}

Log log.

type OriginAsoAccount

type OriginAsoAccount struct {
	Mid            int64     `json:"mid"`
	UserID         string    `json:"userid"`
	Uname          string    `json:"uname"`
	Pwd            string    `json:"pwd"`
	Salt           string    `json:"salt"`
	Email          string    `json:"email"`
	Tel            string    `json:"tel"`
	CountryID      int64     `json:"country_id"`
	MobileVerified int8      `json:"mobile_verified"`
	Isleak         int8      `json:"isleak"`
	Mtime          time.Time `json:"modify_time"`
}

OriginAsoAccount origin aso account.

type ProcStat

type ProcStat struct {
	Cloud2Local *CompareProcStat `json:"cloud_2_local"`
	Local2Cloud *CompareProcStat `json:"local_2_cloud"`
}

type SeqCountAndPercent

type SeqCountAndPercent struct {
	Seq     int64  `json:"seq"`
	Count   int    `json:"count"`
	Percent string `json:"percent"`
}

SeqCountAndPercent process goroutine seq count and percent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL