Documentation ¶
Index ¶
Constants ¶
View Source
const ( MethodLogin = "login" MethodLogout = "logout" MethodPullTask = "pullTask" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BamBooException ¶
type BamBooLoginOutRequest ¶
type BamBooLoginRequest ¶
type BamBooMessage ¶
type BamBooMessage struct { Success bool `json:"success"` TimeStamp int64 `json:"timestamp"` Message string `json:"message"` Exception BamBooException `json:"exception"` TokenID string `json:"tokenId"` SystemCode string `json:"systemCode"` SystemName string `json:"systemName"` Data map[string]interface{} `json:"data"` }
type BamBooUserSyncTool ¶
type BamBooUserSyncTool struct { BambooOptions // contains filtered or unexported fields }
竹云用户同步工具
func NewBamBooSyncTool ¶
func NewBamBooSyncTool(bambooOptions *BambooOptions) *BamBooUserSyncTool
func (*BamBooUserSyncTool) Do ¶
func (s *BamBooUserSyncTool) Do(syncData *BamBooMessage) error
func (*BamBooUserSyncTool) DoRequest ¶
func (s *BamBooUserSyncTool) DoRequest(uri string, result *BamBooMessage) error
func (*BamBooUserSyncTool) Login ¶
func (s *BamBooUserSyncTool) Login() error
func (*BamBooUserSyncTool) Logout ¶
func (s *BamBooUserSyncTool) Logout() error
type BambooOptions ¶
type BambooOptions struct { Host string `json:"host,omitempty"` SystemCode string `json:"systemCode,omitempty"` IntegrationKey string `json:"integrationKey,omitempty"` }
func NewDefaultBambooOptions ¶
func NewDefaultBambooOptions() *BambooOptions
type GitlabUser ¶
type JWTOptions ¶
type JWTOptions struct { JwtExpire time.Duration `json:"jwtExpire,omitempty" description:"jwt expire time"` JWTCert string `json:"jwtCert,omitempty" description:"jwt cert file"` JWTKey string `json:"jwtKey,omitempty" description:"jwt key file"` }
func NewDefaultJWTOptions ¶
func NewDefaultJWTOptions() *JWTOptions
type OauthTool ¶
type OauthTool struct { OauthConfig *oauth2.Config ClientType string UserInfoURL string // contains filtered or unexported fields }
func NewOauthTool ¶
func (*OauthTool) GetAccessToken ¶
func (*OauthTool) GetAuthAddr ¶
func (*OauthTool) GetPersonInfo ¶
func (ot *OauthTool) GetPersonInfo(token *oauth2.Token) (*GitlabUser, error)
type Options ¶
type Options struct { Kind string `json:"kind,omitempty" description:"oauth kind"` UserInfoURL string `json:"userInfoURL,omitempty" description:"user info url"` AppID string `json:"appID,omitempty" description:"app id"` AppSecret string `json:"appSecret,omitempty" description:"app secret"` Scopes []string `json:"scopes,omitempty" description:"scopes"` TokenURL string `json:"tokenURL,omitempty" description:"token url"` AuthURL string `json:"authURL,omitempty" description:"auth url"` RedirectURL string `json:"redirectURL,omitempty" description:"redirect url"` BambooOptions *BambooOptions `json:"bambooOptions,omitempty" description:"bamboo options"` }
func NewDefaultOptions ¶
func NewDefaultOptions() *Options
Click to show internal directories.
Click to hide internal directories.