initial commit
This commit is contained in:
19
internal/domain/llm.go
Normal file
19
internal/domain/llm.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package domain
|
||||
|
||||
import "context"
|
||||
|
||||
// LLMRequest represents a request to the LLM
|
||||
type LLMRequest struct {
|
||||
Prompt string
|
||||
Schema interface{} // JSON schema for structured output
|
||||
}
|
||||
|
||||
// LLMResponse represents the response from the LLM
|
||||
type LLMResponse struct {
|
||||
Content string
|
||||
}
|
||||
|
||||
// LLMProvider defines the interface for LLM providers
|
||||
type LLMProvider interface {
|
||||
Complete(ctx context.Context, request LLMRequest) (*LLMResponse, error)
|
||||
}
|
||||
38
internal/domain/person.go
Normal file
38
internal/domain/person.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package domain
|
||||
|
||||
// Person represents a person with their details
|
||||
type Person struct {
|
||||
Name string `json:"name"`
|
||||
Surname string `json:"surname"`
|
||||
Gender string `json:"gender"`
|
||||
Born int `json:"born"`
|
||||
City string `json:"city"`
|
||||
Job string `json:"-"` // Not exported to JSON, used only for categorization
|
||||
Tags []string `json:"tags"`
|
||||
}
|
||||
|
||||
// Tag represents available categorization tags
|
||||
type Tag string
|
||||
|
||||
const (
|
||||
TagIT Tag = "IT"
|
||||
TagTransport Tag = "transport"
|
||||
TagEdukacja Tag = "edukacja"
|
||||
TagMedycyna Tag = "medycyna"
|
||||
TagPracaZLudźmi Tag = "praca z ludźmi"
|
||||
TagPracaZPojazdami Tag = "praca z pojazdami"
|
||||
TagPracaFizyczna Tag = "praca fizyczna"
|
||||
)
|
||||
|
||||
// AvailableTags returns all available tags
|
||||
func AvailableTags() []Tag {
|
||||
return []Tag{
|
||||
TagIT,
|
||||
TagTransport,
|
||||
TagEdukacja,
|
||||
TagMedycyna,
|
||||
TagPracaZLudźmi,
|
||||
TagPracaZPojazdami,
|
||||
TagPracaFizyczna,
|
||||
}
|
||||
}
|
||||
8
internal/domain/repository.go
Normal file
8
internal/domain/repository.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package domain
|
||||
|
||||
import "context"
|
||||
|
||||
// PersonRepository defines the interface for fetching person data
|
||||
type PersonRepository interface {
|
||||
FetchPeople(ctx context.Context, url string) ([]Person, error)
|
||||
}
|
||||
Reference in New Issue
Block a user