types

package
v0.0.0-...-b42a24c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	ProfileID   uuid.UUID `bson:"profile_id" json:"profile_id"`
	IPAddress   string    `bson:"ip_address" json:"ip_address"`
	AccessToken string    `bson:"access_token" json:"access_token"`
	ExpiresAt   string    `bson:"expires_at" json:"expires_at"`
}

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 ChatGPTMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

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 ChatGTPRequestMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type ContactInfo

type ContactInfo struct {
	Email   string `bson:"email" json:"email"`
	Address string `bson:"address" json:"address"`
	Phone   string `bson:"phone" json:"phone"`
	Website string `bson:"website" json:"website"`
}

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 JobApplicationEvent struct {
	Type            uint    `bson:"type" json:"type"`
	Description     string  `bson:"description" json:"description"`
	Date            string  `bson:"date" json:"date"`
	AdditionalNotes *string `bson:"additional_notes" json:"additional_notes"`
}

type JobPosting

type JobPosting struct {
	CompanyName string `json:"company_name" bind:"required"`
	JobRole     string `json:"job_role" bind:"required"`
	Details     string `json:"job_details"`
	Skills      string `json:"skills"`
}

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL