Documentation ¶
Index ¶
- type AccessToken
- type CareerProfile
- type ChatGPTMessage
- type ChatGPTRequest
- type ChatGPTResponseChoice
- type ChatGPTResponseData
- type ChatGTPRequestMessage
- type ContactInfo
- type CoverLetterRequest
- type Handler
- type JobApplication
- type JobApplicationEvent
- type JobPosting
- type LinkedInTokenResponse
- type LinkedInUserData
- type OpenAIClient
- type StoreClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type CareerProfile ¶
type CareerProfile struct { ID uuid.UUID `bson:"id" json:"id"` FirstName string `bson:"first_name" json:"first_name"` LastName string `bson:"last_name" json:"last_name"` Headline string `bson:"headline" json:"headline"` ExperienceYears uint `bson:"experience_years" json:"experience_years"` Summary *string `bson:"summary" json:"summary"` Skills *[]string `bson:"skills" json:"skills"` ContactInfo *ContactInfo `bson:"contact_info" json:"contact_info"` }
type ChatGPTMessage ¶
type ChatGPTRequest ¶
type ChatGPTRequest struct { Model string `json:"model"` Messages []ChatGTPRequestMessage `json:"messages"` Temperature float32 `json:"temperature"` MaxTokens int `json:"max_tokens"` }
type ChatGPTResponseChoice ¶
type ChatGPTResponseChoice struct { Index int `json:"index"` Message ChatGPTMessage `json:"message"` FinishReason string `json:"finish_reason"` }
type ChatGPTResponseData ¶
type ChatGPTResponseData struct {
Choices []ChatGPTResponseChoice `json:"choices"`
}
type ChatGTPRequestMessage ¶
type ContactInfo ¶
type CoverLetterRequest ¶
type CoverLetterRequest struct { ProfileID uuid.UUID `json:"profile_id"` JobPosting JobPosting `json:"job_posting"` }
type Handler ¶
type Handler interface { HandleIndex(c *gin.Context) HandleCoverLetter(c *gin.Context) HandleCreateCareerProfile(c *gin.Context) HandleGetCareerProfile(c *gin.Context) HandleCreateJobApplication(c *gin.Context) HandleGetJobApplications(c *gin.Context) HandleGetJobApplicationByID(c *gin.Context) HandleDeleteJobApplication(c *gin.Context) HandleLinkedInCallback(c *gin.Context) HandleAuth(c *gin.Context) }
type JobApplication ¶
type JobApplication struct { ID uuid.UUID `bson:"id" json:"id"` ProfileID uuid.UUID `bson:"profile_id" json:"profile_id"` CompanyName string `bson:"company_name" json:"company_name" bind:"required"` JobRole string `bson:"job_role" json:"job_role" bind:"required"` URL *string `bson:"url" json:"url"` Events *[]JobApplicationEvent `bson:"events" json:"events"` CreatedAt *string `bson:"created_at" json:"created_at"` UpdatedAt *string `bson:"updated_at" json:"updated_at"` }
type JobApplicationEvent ¶
type JobPosting ¶
type LinkedInTokenResponse ¶
type LinkedInTokenResponse struct { AccessToken string `json:"access_token"` ExpiresIn float64 `json:"expires_in"` RefreshToken string `json:"refresh_token"` RefreshTokenExpiresIn float64 `json:"refresh_token_expires_in"` Scope string `json:"scope"` }
func MapToLinkedInTokenResponse ¶
func MapToLinkedInTokenResponse(data map[string]interface{}) LinkedInTokenResponse
type LinkedInUserData ¶
type LinkedInUserData struct { Sub string `json:"sub"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Picture string `json:"picture"` Email string `json:"email"` }
func MapToLinkedInUserData ¶
func MapToLinkedInUserData(data map[string]interface{}) LinkedInUserData
type OpenAIClient ¶
type OpenAIClient interface { GenerateChatGPTCoverLetter(c *gin.Context, profileId uuid.UUID, jobPosting *JobPosting, s StoreClient) (string, int, error) GetCareerProfileInfoPrompt(profileId uuid.UUID, s StoreClient) (string, *CareerProfile, error) ParseCoverLetter(coverLetter *string, careerProfile *CareerProfile, jobPosting *JobPosting) (string, error) }
type StoreClient ¶
type StoreClient interface { Connect() (*mongo.Client, context.Context, error) Disconnect(ctx context.Context, client *mongo.Client) GetCareerProfileByEmail(email string) (*CareerProfile, error) GetCareerProfileByID(profileId uuid.UUID) (*CareerProfile, error) StoreCareerProfile(careerProfileRequest *CareerProfile) (*CareerProfile, string, error) GetJobApplications(profileId uuid.UUID) (*[]JobApplication, error) GetJobApplicationByID(jobApplicationId uuid.UUID) (*JobApplication, error) StoreJobApplication(jobApplicationRequest *JobApplication) (*JobApplication, string, error) DeleteJobApplication(jobApplicationId uuid.UUID) error StoreAccessToken(profileId uuid.UUID, accessToken string, ipAddress string) (string, error) ValidateAccessToken(profileId uuid.UUID, accessToken string, ipAddress string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.