TestAPI

package
v5.1.37 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoginUsername   = "weeekj_admin"
	LoginPassword   = "weeekj_admin_weeekj_admin"
	LoginNationCode = "86"
	LoginPhone      = "17000000001"
)

Functions

func CreateUser

func CreateUser() (UserCore.FieldsUserType, error)

创建临时使用的用户 自动授权基础用户组权限,可调整其他用户组,用于权限封闭测试

func Delete

func Delete(action string, params interface{}) ([]byte, error)

func DeleteUser

func DeleteUser(id int64) error

删除临时创建的用户

func Get

func Get(action string) ([]byte, error)

func GetConfig

func GetConfig(markList []string) ([]BaseConfig.FieldsConfigType, error)

获取全局配置

func GetNewToken

func GetNewToken() (int64, string, error)

获取匿名token 同时将自动写入token组

func GetUserData

func GetUserData() (UserCore.DataUserDataType, error)

获取登陆用户信息

func LoginUserByPassword

func LoginUserByPassword() (token int64, key string, userData UserCore.DataUserDataType, err error)

使用标准接口登陆 注意应关闭验证码,否则将失败 url: /v2/login/login/header/user/password

func Patch

func Patch(action string, params interface{}) ([]byte, error)

func Post

func Post(action string, params interface{}) ([]byte, error)

func Put

func Put(action string, params interface{}) ([]byte, error)

func SendSMS

func SendSMS(nationCode, phone string) error

测试发送短信验证码 注意,必须具备了前置token,才可以使用本接口 可用于部分需要验证码的环节

func SetBaseURL

func SetBaseURL(tBaseURL string)

func SetToken

func SetToken(tToken int64, tKey string)

func UpdateUserGroups

func UpdateUserGroups(id int64, groupMark string) error

修改用户的用户组

Types

This section is empty.

Jump to

Keyboard shortcuts

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