josegpt

package module
v1.21.12 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

README

josegpt.com

builds.sr.ht status

This is my personal space :)

Quick start

Development
go mod download
go run cmd/josegpt/main.go
Test
go test -v -cover ./...
Coverage Func
go test -coverprofile c.out ./...
go tool cover -func c.out
Coverage HTML
go test -coverprofile c.out ./...
go tool cover -html c.out
Deployment
go mod download
go build -o josegpt cmd/josegpt/main.go
./josegpt

License

AGPL-3.0-or-later

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLanguage added in v1.21.0

func IsLanguage(s string) bool

func IsLicense added in v1.21.0

func IsLicense(s string) bool

Types

type Language added in v1.21.0

type Language uint8
const (
	Unknown Language = iota
	C
	Go
	PHP
	Java
	Shell
	EmacsLisp
	JavaScript
)

func StringLanguage added in v1.21.0

func StringLanguage(s string) Language

func (Language) String added in v1.21.0

func (l Language) String() string

type License added in v1.21.0

type License uint8
const (
	None License = iota
	ISC
	MIT
	GPL3
	AGPL3
	LGPL3
)

func StringLicense added in v1.21.0

func StringLicense(s string) License

func (License) String added in v1.21.0

func (l License) String() string

type Project added in v1.21.0

type Project struct {
	Name        string
	Description string
	URL         string
	Topics      []string
	Fork        bool
	License     License
	Language    Language
}

type ProjectFinder added in v1.21.0

type ProjectFinder interface {
	Find(ctx context.Context, topic string) ([]*Project, error)
}

type ProjectRepository added in v1.21.0

type ProjectRepository interface {
	Projects(ctx context.Context, topic string) ([]*Project, error)
	UpsertProjects(ctx context.Context, pp []*ProjectUpsert) error
}

type ProjectService added in v1.21.0

type ProjectService interface {
	ProjectFinder
	ProjectUpserter
}

type ProjectUpsert added in v1.21.0

type ProjectUpsert struct {
	Name        string
	Description string
	URL         string
	Topics      []string
	Fork        bool
	License     License
	Language    Language
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type ProjectUpserter added in v1.21.0

type ProjectUpserter interface {
	Upsert(ctx context.Context, pp []*ProjectUpsert) error
}

type VCService added in v1.21.0

type VCService interface {
	Projects(ctx context.Context) ([]*ProjectUpsert, error)
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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