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 BamBooException struct {
Name string `json:"name"`
Message string `json:"message"`
}
type BamBooLoginOutRequest ¶
type BamBooLoginOutRequest struct {
TimeStamp int64 `json:"timestamp"`
TokenID string `json:"tokenId"`
}
type BamBooLoginRequest ¶
type BamBooLoginRequest struct {
SystemCode string `json:"systemCode"`
IntegrationKey string `json:"integrationKey"`
Force bool `json:"force"`
TimeStamp int64 `json:"timestamp"`
}
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
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 GitlabUser struct {
Username string `json:"username"`
Email string `json:"email"`
}
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 NewOauthTool(opts *Options) *OauthTool
func (*OauthTool) GetAccessToken ¶
func (ot *OauthTool) GetAccessToken(code string) (*oauth2.Token, error)
func (*OauthTool) GetAuthAddr ¶
func (ot *OauthTool) GetAuthAddr() string
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.