Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuiltINData ¶
type Client ¶
type Client struct { // build-in Login *LoginService // contains filtered or unexported fields }
func NewBasicAuthClient ¶
func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) (*Client, error)
func (*Client) RequestURL ¶
RequestURL restful api request url
type ClientOptionFunc ¶
func WithBaseURL ¶
func WithBaseURL(urlStr string) ClientOptionFunc
WithBaseURL sets the base URL for API requests to a custom endpoint.
func WithDevMode ¶
func WithDevMode() ClientOptionFunc
func WithDumpAll ¶
func WithDumpAll() ClientOptionFunc
func WithUserAgent ¶
func WithUserAgent(ua string) ClientOptionFunc
func WithZenTaoMode ¶
func WithZenTaoMode(mode ZentaoMode) ClientOptionFunc
WithZenTaoMode sets the mode for Zentao built-in page requests.
func WithoutProxy ¶
func WithoutProxy() ClientOptionFunc
WithoutProxy 禁用代理, 默认情况下会读取HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy变量
type LoginRespData ¶
type LoginRespData struct { Status string `json:"status"` User LoginUserData `json:"user"` }
type LoginService ¶
type LoginService struct {
// contains filtered or unexported fields
}
func (*LoginService) GetSessionID ¶
func (s *LoginService) GetSessionID() (*string, *req.Response, error)
func (*LoginService) Login ¶
func (s *LoginService) Login() (bool, *LoginRespData, *req.Response, error)
type LoginUserData ¶
type LoginUserData struct { ID string `json:"id"` Company string `json:"company"` Type string `json:"type"` Dept string `json:"dept"` Account string `json:"account"` Role string `json:"role"` Realname string `json:"realname"` Pinyin string `json:"pinyin"` Nickname string `json:"nickname"` Commiter string `json:"commiter"` Avatar string `json:"avatar"` Birthday string `json:"birthday"` Gender string `json:"gender"` Email string `json:"email"` Skype string `json:"skype"` Qq string `json:"qq"` Mobile string `json:"mobile"` Phone string `json:"phone"` Weixin string `json:"weixin"` Dingding string `json:"dingding"` Slack string `json:"slack"` Whatsapp string `json:"whatsapp"` Address string `json:"address"` Zipcode string `json:"zipcode"` Nature string `json:"nature"` Analysis string `json:"analysis"` Strategy string `json:"strategy"` Join string `json:"join"` Visits string `json:"visits"` Visions string `json:"visions"` IP string `json:"ip"` Last string `json:"last"` Fails string `json:"fails"` Locked string `json:"locked"` Feedback string `json:"feedback"` Ranzhi string `json:"ranzhi"` Ldap string `json:"ldap"` Score string `json:"score"` ScoreLevel string `json:"scoreLevel"` ResetToken string `json:"resetToken"` ClientStatus string `json:"clientStatus"` ClientLang string `json:"clientLang"` LastTime string `json:"lastTime"` Admin bool `json:"admin"` ModifyPassword bool `json:"modifyPassword"` Rights LoginUserRights `json:"rights"` Groups struct { Num13 string `json:"13"` } `json:"groups"` View LoginUserView `json:"view"` Token string `json:"token"` }
type LoginUserRights ¶
type LoginUserRights struct { Rights struct { Program struct { Activate bool `json:"activate"` Batchunlinkstakeholders bool `json:"batchunlinkstakeholders"` Browse bool `json:"browse"` Close bool `json:"close"` Create bool `json:"create"` Createstakeholder bool `json:"createstakeholder"` Delete bool `json:"delete"` Edit bool `json:"edit"` Kanban bool `json:"kanban"` Product bool `json:"product"` Project bool `json:"project"` Stakeholder bool `json:"stakeholder"` Start bool `json:"start"` Suspend bool `json:"suspend"` Unbindwhitelist bool `json:"unbindwhitelist"` Unlinkstakeholder bool `json:"unlinkstakeholder"` Updateorder bool `json:"updateorder"` View bool `json:"view"` } `json:"program"` Projectplan struct { Browse bool `json:"browse"` } `json:"projectplan"` Traincourse struct { Browse bool `json:"browse"` Practice bool `json:"practice"` Practicebrowse bool `json:"practicebrowse"` Practiceview bool `json:"practiceview"` Updatepractice bool `json:"updatepractice"` Viewchapter bool `json:"viewchapter"` Viewcourse bool `json:"viewcourse"` } `json:"traincourse"` Index struct { Index int `json:"index"` } `json:"index"` My struct { Index int `json:"index"` } `json:"my"` } `json:"rights"` Acls []any `json:"acls"` Projects string `json:"projects"` Programs string `json:"programs"` Products string `json:"products"` Executions string `json:"executions"` }
type LoginUserView ¶
type SessionData ¶
type ZentaoMode ¶
type ZentaoMode string
const ( ZentaoDefultMode ZentaoMode = "PATH_INFO" ZentaoGetMode ZentaoMode = "GET" )
func (ZentaoMode) String ¶
func (z ZentaoMode) String() string
Click to show internal directories.
Click to hide internal directories.