Documentation
¶
Index ¶
- Constants
- func ConvertUser(u *User, roleFixed bool) *types2.User
- func MergeOAuthAppManifests(r, other types.OAuthAppManifest) types.OAuthAppManifest
- func ValidateAndSetDefaultsOAuthAppManifest(r *types.OAuthAppManifest, create bool) error
- type AuthToken
- type GoogleOAuthTokenResponse
- type Identity
- type LLMProvider
- type LLMProxyActivity
- type Model
- type OAuthAppTypeConfig
- type OAuthTokenRequestChallenge
- type OAuthTokenResponse
- 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" )
Variables ¶
This section is empty.
Functions ¶
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" 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 LLMProvider ¶
type LLMProvider struct { ID uint `json:"id" gorm:"primaryKey"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` Name string `json:"name"` Slug string `json:"slug" gorm:"unique;index"` BaseURL string `json:"baseURL"` Token string `json:"token"` Disabled bool `json:"disabled"` }
func (*LLMProvider) RequestBaseURL ¶
func (lp *LLMProvider) RequestBaseURL(serverBase string) string
func (*LLMProvider) URL ¶
func (lp *LLMProvider) URL() string
func (*LLMProvider) Validate ¶
func (lp *LLMProvider) Validate() error
type LLMProxyActivity ¶
type Model ¶
type Model struct { ID string `json:"id" gorm:"unique"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` LLMProviderID uint `json:"llmProviderID" gorm:"foreignKey:id;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` ProviderModelName string `json:"providerModelName"` Disabled bool `json:"disabled"` }
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 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 ¶
Click to show internal directories.
Click to hide internal directories.