Documentation
¶
Index ¶
- Constants
- func ConvertAPIActivity(a APIActivity) types2.APIActivity
- func ConvertUser(u *User, roleFixed bool, authProviderName string) *types2.User
- func MergeOAuthAppManifests(r, other types.OAuthAppManifest) types.OAuthAppManifest
- func ValidateAndSetDefaultsOAuthAppManifest(r *types.OAuthAppManifest, create bool) error
- type APIActivity
- type AuthToken
- type GoogleOAuthTokenResponse
- type Identity
- type Image
- type LLMProxyActivity
- type OAuthAppTypeConfig
- type OAuthTokenRequestChallenge
- type OAuthTokenResponse
- type RunState
- type SalesforceOAuthTokenResponse
- type SlackOAuthTokenResponse
- type TokenRequest
- type User
- type UserQuery
Constants ¶
View Source
const ( AtlassianAuthorizeURL = "https://auth.atlassian.com/authorize" AtlassianTokenURL = "https://auth.atlassian.com/oauth/token" SlackAuthorizeURL = "https://slack.com/oauth/v2/authorize" SlackTokenURL = "https://slack.com/api/oauth.v2.access" NotionAuthorizeURL = "https://api.notion.com/v1/oauth/authorize" NotionTokenURL = "https://api.notion.com/v1/oauth/token" HubSpotAuthorizeURL = "https://app.hubspot.com/oauth/authorize" HubSpotTokenURL = "https://api.hubapi.com/oauth/v1/token" GoogleAuthorizeURL = "https://accounts.google.com/o/oauth2/v2/auth" GoogleTokenURL = "https://oauth2.googleapis.com/token" GitHubAuthorizeURL = "https://github.com/login/oauth/authorize" GitHubTokenURL = "https://github.com/login/oauth/access_token" ZoomAuthorizeURL = "https://zoom.us/oauth/authorize" ZoomTokenURL = "https://zoom.us/oauth/token" LinkedInAuthorizeURL = "https://www.linkedin.com/oauth/v2/authorization" LinkedInTokenURL = "https://www.linkedin.com/oauth/v2/accessToken" PagerDutyAuthorizeURL = "https://identity.pagerduty.com/oauth/authorize" PagerDutyTokenURL = "https://identity.pagerduty.com/oauth/token" )
Variables ¶
This section is empty.
Functions ¶
func ConvertAPIActivity ¶ added in v0.7.1
func ConvertAPIActivity(a APIActivity) types2.APIActivity
func MergeOAuthAppManifests ¶
func MergeOAuthAppManifests(r, other types.OAuthAppManifest) types.OAuthAppManifest
func ValidateAndSetDefaultsOAuthAppManifest ¶
func ValidateAndSetDefaultsOAuthAppManifest(r *types.OAuthAppManifest, create bool) error
Types ¶
type AuthToken ¶
type AuthToken struct {
ID string `json:"id" gorm:"index:idx_id_hashed_token"`
UserID uint `json:"-" gorm:"index"`
AuthProviderNamespace string `json:"-" gorm:"index"`
AuthProviderName string `json:"-" gorm:"index"`
HashedToken string `json:"-" gorm:"index:idx_id_hashed_token"`
CreatedAt time.Time `json:"createdAt"`
ExpiresAt time.Time `json:"expiresAt"`
}
type Identity ¶
type Identity struct {
AuthProviderName string `json:"authProviderName" gorm:"primaryKey;index:idx_user_auth_id"`
AuthProviderNamespace string `json:"authProviderNamespace" gorm:"primaryKey;index:idx_user_auth_id"`
ProviderUsername string `json:"providerUsername"`
ProviderUserID string `json:"providerUserID" gorm:"primaryKey"`
Email string `json:"email"`
UserID uint `json:"userID" gorm:"index:idx_user_auth_id"`
IconURL string `json:"iconURL"`
IconLastChecked time.Time `json:"iconLastChecked"`
}
type Image ¶ added in v0.7.0
type LLMProxyActivity ¶
type OAuthAppTypeConfig ¶
type OAuthTokenResponse ¶
type OAuthTokenResponse struct {
State string `json:"state"`
TokenType string `json:"token_type"`
Scope string `json:"scope"`
ExpiresIn int `json:"expires_in"`
ExtExpiresIn int `json:"ext_expires_in"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
Ok bool `json:"ok"`
Error string `json:"error"`
CreatedAt time.Time
Extras map[string]string `json:"extras" gorm:"serializer:json"`
}
OAuthTokenResponse represents a response from the /token endpoint on an OAuth server. These do not get stored in the database.
type RunState ¶ added in v0.7.0
type RunState struct {
Name string `json:"name" gorm:"primaryKey"`
Namespace string `json:"namespace" gorm:"primaryKey"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
ThreadName string `json:"threadName,omitempty"`
Program []byte `json:"program,omitempty"`
ChatState []byte `json:"chatState,omitempty"`
CallFrame []byte `json:"callFrame,omitempty"`
Output []byte `json:"output,omitempty"`
Done bool `json:"done,omitempty"`
Error string `json:"error,omitempty"`
}
type SalesforceOAuthTokenResponse ¶ added in v0.5.0
type SalesforceOAuthTokenResponse struct {
AccessToken string `json:"access_token"`
Signature string `json:"signature"`
Scope string `json:"scope"`
IDToken string `json:"id_token"`
InstanceURL string `json:"instance_url"`
ID string `json:"id"`
RefreshToken string `json:"refresh_token"`
TokenType string `json:"token_type"`
IssuedAt string `json:"issued_at"`
}
type SlackOAuthTokenResponse ¶
type TokenRequest ¶
type User ¶
type User struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"createdAt"`
Username string `json:"username" gorm:"unique"`
Email string `json:"email"`
VerifiedEmail *bool `json:"verifiedEmail,omitempty"`
Role types2.Role `json:"role"`
IconURL string `json:"iconURL"`
Timezone string `json:"timezone"`
// LastActiveDay is the time of the last request made by this user, currently at the 24 hour granularity.
LastActiveDay time.Time `json:"lastActiveDay"`
}
Click to show internal directories.
Click to hide internal directories.