domain

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeSnippet

type CodeSnippet struct {
	Code     string `json:"code"`
	LangSlug string `json:"langSlug"`
}

type FileType

type FileType string
const (
	SolutionFile FileType = "solution"
	TestFile     FileType = "test"
	ReadmeFile   FileType = "readme"
)

type Language

type Language struct {
	// contains filtered or unexported fields
}

func NewProgrammingLanguage

func NewProgrammingLanguage(name string) Language

func (Language) DisplayName

func (l Language) DisplayName() string

func (Language) Extension

func (l Language) Extension() string

func (Language) Slug

func (l Language) Slug() string

func (Language) TemplateName

func (l Language) TemplateName() string

func (Language) TestExtension

func (l Language) TestExtension() string

func (Language) TestTemplate

func (l Language) TestTemplate() string

type Path

type Path string

func NewDirectoryPath

func NewDirectoryPath(path string) (Path, error)

func NewFilePath

func NewFilePath(path string) (Path, error)

func (Path) Basename

func (f Path) Basename() string

func (Path) Dir

func (f Path) Dir() string

func (Path) DisplayPath

func (p Path) DisplayPath() string

func (Path) Exists

func (f Path) Exists() bool

func (Path) Join

func (p Path) Join(parts ...string) Path

func (Path) String

func (f Path) String() string

type Problem

type Problem struct {
	ID            string
	Title         string
	Slug          string
	DirName       string
	Content       string
	Code          string
	Difficulty    string
	FunctionName  string
	Testcases     []string
	Status        string
	LastAttempted string
	Language      Language
	DirectoryPath Path
	FileSet       []ProblemFile // Solution, Test, Readme
}

func (*Problem) GetID

func (p *Problem) GetID() int

func (*Problem) SolutionExists

func (p *Problem) SolutionExists() bool

func (*Problem) SolutionPath

func (p *Problem) SolutionPath() string

type ProblemFile

type ProblemFile struct {
	Type     FileType //solution
	Path     Path     //katas/ts/two_sum.ts
	Language Language // Typescript
}

func NewProblemFileSet

func NewProblemFileSet(baseName string, lang Language, directory Path) []ProblemFile

type QuestionStat

type QuestionStat struct {
	ID         string
	Title      string
	Difficulty string
	LangStatus map[string]bool
}

Jump to

Keyboard shortcuts

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