gongxueyun_service

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetries    = 15
	DefaultPlanID = "6686304d065db846edab7d4565065abc"
	PageSize      = 999999
)
View Source
const (
	START = iota
	END
)

Variables

This section is empty.

Functions

func CusDataStructureFilling

func CusDataStructureFilling(typeStr string, mogu *MoguDing) map[string]interface{}

客制化打卡上班还是下班信息

func DataStructureFilling

func DataStructureFilling(mogu *MoguDing) map[string]interface{}

DataStructureFilling creates a data structure for signing.

func EncryptTimestamp

func EncryptTimestamp(timestamp int64) (string, error)

EncryptTimestamp encrypts a given timestamp.

func GenerateRandomFloat

func GenerateRandomFloat(baseIntegerPart int) float64

GenerateRandomFloat generates a random float based on a base integer part.

func GenerateReportAI

func GenerateReportAI(userInput string, wordLimit int) string

GenerateReportAI generates a report using AI based on user input.

func GetClockType

func GetClockType() (string, error)

GetClockType determines the clock type (START or END) based on the current time.

func GetCustomClockType

func GetCustomClockType(playType int) (string, error)

GetCustomClockType Custom START or END

func GetFormattedTime

func GetFormattedTime() (string, error)

GetFormattedTime returns the current time formatted as a string.

func LoadUsers

func LoadUsers() []entity.SignEntity

LoadUsers loads user data either from configuration or database.

func SubmitStructureFilling

func SubmitStructureFilling(mogu *MoguDing, content, title, retype string) map[string]interface{}

SubmitStructureFilling creates a submission data structure.

Types

type JobInfo

type JobInfo struct {
	JobName     string `json:"jobName"`
	Address     string `json:"address"`
	CompanyName string `json:"companyName"`
}

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

Message represents a single message in the conversation.

type MoguDing

type MoguDing struct {
	ID             int              `json:"ID"`
	UserId         string           `json:"userId"`
	RoleKey        string           `json:"roleKey"`
	Authorization  string           `json:"authorization"`
	PlanID         string           `json:"planId"`
	PlanName       string           `json:"planName"`
	PhoneNumber    string           `json:"phoneNumber"`
	Password       string           `json:"password"`
	Email          string           `json:"email"`
	Sign           SignInfo         `json:"sign"`
	CommParameters commonParameters `json:"commParameters"`
	ReportStruct   report           `json:"report"`
	WeekTime       weekTime         `json:"weekTime"`
	JobInfo        JobInfo          `json:"jobInfo"`
}

func (*MoguDing) CusSignIn

func (mogu *MoguDing) CusSignIn(signType string)

func (*MoguDing) GetJobInfo

func (mogu *MoguDing) GetJobInfo() error

func (*MoguDing) GetPlanId

func (mogu *MoguDing) GetPlanId() error

func (*MoguDing) HandleCaptcha

func (mo *MoguDing) HandleCaptcha() error

滑块验证码逻辑

func (*MoguDing) Login

func (mogu *MoguDing) Login() error

func (*MoguDing) Run

func (m *MoguDing) Run(runType string)

func (*MoguDing) SignIn

func (mogu *MoguDing) SignIn()

func (*MoguDing) SubmitReport

func (mogu *MoguDing) SubmitReport(reportType string, limit int)

SubmitReport 提交定时报告

type RequestData

type RequestData struct {
	MaxTokens   int       `json:"max_tokens"`
	TopK        int       `json:"top_k"`
	Temperature float64   `json:"temperature"`
	Messages    []Message `json:"messages"`
	Model       string    `json:"model"`
	Stream      bool      `json:"stream"`
}

RequestData represents the request payload.

type SignInfo

type SignInfo struct {
	//	构造签到信息
	Address   string `json:"address"`
	City      string `json:"city"`
	Area      string `json:"area"`
	Country   string `json:"country"`
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
	Province  string `json:"province"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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