api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentRequest

type AgentRequest struct {
	Hostname     string              `json:"hostname" validate:"required"`
	Repositories []*repository.Local `json:"repositories" validate:"required,min=1,dive"`
}

func (AgentRequest) MarshalEasyJSON

func (v AgentRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AgentRequest) MarshalJSON

func (v AgentRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AgentRequest) UnmarshalEasyJSON

func (v *AgentRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AgentRequest) UnmarshalJSON

func (v *AgentRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FileInfoResponse

type FileInfoResponse struct {
	Name   string    `json:"name"`
	Time   time.Time `json:"time"`
	Status string    `json:"status"`
}

func ToFileInfoResponses

func ToFileInfoResponses(resp []repository.FileInfo) []*FileInfoResponse

func (FileInfoResponse) MarshalEasyJSON

func (v FileInfoResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FileInfoResponse) MarshalJSON

func (v FileInfoResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FileInfoResponse) UnmarshalEasyJSON

func (v *FileInfoResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FileInfoResponse) UnmarshalJSON

func (v *FileInfoResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LocalRepositoryResponse

type LocalRepositoryResponse struct {
	Hostname          string              `json:"host_name"`
	FolderName        string              `json:"folder_name"`
	CurrentBranch     string              `json:"current_branch"`
	Clean             bool                `json:"clean"`
	LastCommit        *repository.Commit  `json:"last_commit"`
	UntrackedFiles    []*FileInfoResponse `json:"untracked_files"`
	ChangedFiles      []*FileInfoResponse `json:"changed_files"`
	LastModifiedFiles []*FileInfoResponse `json:"last_changed_files"`
	FetchTime         time.Time           `json:"fetch_time"`
	Description       string              `json:"description"`
	Language          string              `json:"language"`
	LanguageIcon      string              `json:"language_icon"`
}

func ToLocalRepositoryResponse

func ToLocalRepositoryResponse(r *repository.Local) LocalRepositoryResponse

func (LocalRepositoryResponse) MarshalEasyJSON

func (v LocalRepositoryResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LocalRepositoryResponse) MarshalJSON

func (v LocalRepositoryResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LocalRepositoryResponse) UnmarshalEasyJSON

func (v *LocalRepositoryResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LocalRepositoryResponse) UnmarshalJSON

func (v *LocalRepositoryResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ServerResponse

type ServerResponse struct {
	Message string `json:"message"`
	Error   string `json:"error,omitempty"`
}

func (ServerResponse) MarshalEasyJSON

func (v ServerResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ServerResponse) MarshalJSON

func (v ServerResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ServerResponse) UnmarshalEasyJSON

func (v *ServerResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ServerResponse) UnmarshalJSON

func (v *ServerResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SummaryResponse

type SummaryResponse struct {
	Origins map[string][]LocalRepositoryResponse `json:"origins"`
}

func (SummaryResponse) MarshalEasyJSON

func (v SummaryResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SummaryResponse) MarshalJSON

func (v SummaryResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SummaryResponse) UnmarshalEasyJSON

func (v *SummaryResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SummaryResponse) UnmarshalJSON

func (v *SummaryResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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