Documentation
¶
Index ¶
- func MarshalClass(c Class, t string) protocol.Part
- func MarshalSuggestion(s OldSuggestion) protocol.Part
- type Artifacts
- type Class
- type Critic
- type Description
- type FSClass
- type FSProj
- type Facilitator
- type Fixer
- type InMemoryProject
- type Job
- type MirrorProject
- type OldSuggestion
- type Project
- type Reviewer
- type Suggestion
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalSuggestion ¶ added in v0.2.2
func MarshalSuggestion(s OldSuggestion) protocol.Part
Types ¶
type Artifacts ¶ added in v0.2.2
type Artifacts struct {
Descr *Description
Classes []Class
Suggestions []Suggestion
}
func UnmarshalArtifacts ¶ added in v0.2.2
func (*Artifacts) Marshal ¶ added in v0.2.2
func (a *Artifacts) Marshal() *protocol.MessageSendParams
type Class ¶
type Class interface {
Name() string
Content() string
Path() string
SetContent(content string) error
}
Class represents a code or text entity with a name and content.
func NewInMemoryClass ¶ added in v0.2.2
NewInMemoryClass creates a new Class instance with the given name and content.
type Description ¶ added in v0.2.2
func UnmarshalDescription ¶ added in v0.2.2
func UnmarshalDescription(part protocol.Part) (*Description, error)
func (*Description) Marshal ¶ added in v0.2.2
func (d *Description) Marshal() protocol.Part
type FSClass ¶ added in v0.2.2
type FSClass struct {
// contains filtered or unexported fields
}
FSClass represents a Java class file stored in the filesystem.
func NewFSClass ¶ added in v0.2.2
NewFSClass creates a new FilesystemClass with the given name, path, and content.
func (*FSClass) SetContent ¶ added in v0.2.2
SetContent updates the content of the Java class file and writes it to the filesystem.
type FSProj ¶ added in v0.2.2
type FSProj struct {
// contains filtered or unexported fields
}
FSProj represents a project stored in the filesystem.
func NewFilesystem ¶ added in v0.2.2
NewFilesystem creates a new FilesystemProject with the given path.
type Facilitator ¶
Facilitator represents an interface to refactor tasks into multiple classes.
type InMemoryProject ¶ added in v0.2.2
type InMemoryProject struct {
// contains filtered or unexported fields
}
InMemoryProject is an implementation of Project that stores its classes in memory.
func (*InMemoryProject) Classes ¶ added in v0.2.2
func (i *InMemoryProject) Classes() ([]Class, error)
Classes retrieves all Java classes in the in-memory project.
func (*InMemoryProject) String ¶ added in v0.2.2
func (i *InMemoryProject) String() string
String returns a string representation of the in-memory project.
type Job ¶ added in v0.2.2
type Job struct {
Descr *Description
Classes []Class
Suggestions []Suggestion
Examples []Class
}
func (*Job) Marshal ¶ added in v0.2.2
func (j *Job) Marshal() *protocol.MessageSendParams
type MirrorProject ¶ added in v0.2.2
type MirrorProject struct {
// contains filtered or unexported fields
}
MirrorProject decorates FilesystemProject with a mirror location to avoid modifying the original.
func NewMirrorProject ¶ added in v0.2.2
func NewMirrorProject(original *FSProj, mirrorPath string) (*MirrorProject, error)
NewMirrorProject creates a mirror of the original FilesystemProject at the given path.
func (*MirrorProject) Classes ¶ added in v0.2.2
func (m *MirrorProject) Classes() ([]Class, error)
Classes retrieves all Java classes from the mirrored project.
type OldSuggestion ¶ added in v0.2.2
type OldSuggestion interface {
Text() string
}
OldSuggestion represents a proposed improvement or fix for a class.
func NewOldSuggestion ¶ added in v0.2.2
func NewOldSuggestion(text string) OldSuggestion
NewOldSuggestion creates a new Suggestion instance with the given text.
func UnmarshalOldSuggestion ¶ added in v0.2.2
func UnmarshalOldSuggestion(part protocol.Part) (OldSuggestion, error)
type Project ¶ added in v0.2.2
type Project interface {
// Classes retrieves all Java classes within the project.
Classes() ([]Class, error)
}
Project represents an interface for managing Java classes within a project.
func NewInMemory ¶ added in v0.2.2
NewInMemory creates a new in-memory project with the given map of file names to Java class content.
type Reviewer ¶ added in v0.2.2
Reviewer represents an interface for a reviewer that can review changes made.
type Suggestion ¶
func NewSuggestion ¶
func NewSuggestion(text, path string) *Suggestion
func UnmarshalSuggestion ¶ added in v0.2.2
func UnmarshalSuggestion(part protocol.Part) (*Suggestion, error)
func (*Suggestion) Marshal ¶ added in v0.2.2
func (s *Suggestion) Marshal() protocol.Part
func (*Suggestion) String ¶ added in v0.2.2
func (s *Suggestion) String() string