Documentation ¶
Index ¶
- Variables
- func FindRepoRootFrom(cwd ports.CWD) (string, error)
- func IdentitiesStore(ctx context.Context, sources ...identityStoreSource) (ports.IdentitiesStore, error)
- func NewGitRepositoryFromPath(from ports.CWD) (*GitRepository, *ReadWriteDirFS, error)
- type AgentIdentitiesStore
- type AgentIdentitiesStoreSource
- type FileIdentityStore
- type FileIdentityStoreSource
- type GitRepository
- func (g GitRepository) Commit(message string) error
- func (g GitRepository) IsStagingDirty() (bool, error)
- func (g GitRepository) OpenObjectAtHead(filePath string) (*object.File, error)
- func (g GitRepository) Remotes() ([]string, error)
- func (g GitRepository) StageFile(path string) error
- func (g GitRepository) WalkAgeFiles(onMatch fs.WalkDirFunc) error
- type ReadWriteDirFS
- func (f ReadWriteDirFS) Create(filePath string, opts ...ports.OpenRWOptions) (ports.ReadWriteFile, error)
- func (f ReadWriteDirFS) Mkdir(dir string, all bool, mode os.FileMode) error
- func (f ReadWriteDirFS) Open(name string) (fs.File, error)
- func (f ReadWriteDirFS) ReadDir(name string) ([]fs.DirEntry, error)
- func (f ReadWriteDirFS) Remove(filePath string) error
- func (f ReadWriteDirFS) Rename(oldPath, newPath string) error
- func (f ReadWriteDirFS) TempFile(dir, pattern string) (ports.ReadWriteFile, error)
- type RecipientsFile
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRepoNotFound = errors.New("could not find git repository")
Functions ¶
func IdentitiesStore ¶ added in v0.2.0
func IdentitiesStore(ctx context.Context, sources ...identityStoreSource) (ports.IdentitiesStore, error)
func NewGitRepositoryFromPath ¶
func NewGitRepositoryFromPath(from ports.CWD) (*GitRepository, *ReadWriteDirFS, error)
Types ¶
type AgentIdentitiesStore ¶ added in v0.2.0
type AgentIdentitiesStore struct {
IdentitiesClient agentv1connect.IdentitiesStoreServiceClient
}
func (AgentIdentitiesStore) Generate ¶ added in v0.2.0
func (a AgentIdentitiesStore) Generate( ctx context.Context, cmd dto.GenerateIdentityCommand, ) (publicKey string, err error)
func (AgentIdentitiesStore) Identities ¶ added in v0.2.0
func (a AgentIdentitiesStore) Identities(ctx context.Context, query dto.IdentitiesQuery) ([]age.Identity, error)
type AgentIdentitiesStoreSource ¶ added in v0.2.0
type AgentIdentitiesStoreSource struct { BaseUrl string Client connect.HTTPClient }
func NewAgentIdentitiesStoreSource ¶ added in v0.2.0
func NewAgentIdentitiesStoreSource() *AgentIdentitiesStoreSource
func (*AgentIdentitiesStoreSource) GetStore ¶ added in v0.2.0
func (a *AgentIdentitiesStoreSource) GetStore() (ports.IdentitiesStore, error)
type FileIdentityStore ¶ added in v0.2.0
func (*FileIdentityStore) Generate ¶ added in v0.2.0
func (f *FileIdentityStore) Generate(_ context.Context, cmd dto.GenerateIdentityCommand) (publicKey string, err error)
func (*FileIdentityStore) Identities ¶ added in v0.2.0
func (f *FileIdentityStore) Identities(context.Context, dto.IdentitiesQuery) ([]age.Identity, error)
type FileIdentityStoreSource ¶ added in v0.2.0
func NewFileIdentityStoreSource ¶ added in v0.2.0
func NewFileIdentityStoreSource(url *url.URL) *FileIdentityStoreSource
func (*FileIdentityStoreSource) GetStore ¶ added in v0.2.0
func (f *FileIdentityStoreSource) GetStore() (ports.IdentitiesStore, error)
type GitRepository ¶
func NewGitRepository ¶
func NewGitRepository(repoFS fs.FS, repository *git.Repository) (*GitRepository, error)
func (GitRepository) Commit ¶
func (g GitRepository) Commit(message string) error
func (GitRepository) IsStagingDirty ¶
func (g GitRepository) IsStagingDirty() (bool, error)
func (GitRepository) OpenObjectAtHead ¶
func (g GitRepository) OpenObjectAtHead(filePath string) (*object.File, error)
func (GitRepository) Remotes ¶ added in v0.2.0
func (g GitRepository) Remotes() ([]string, error)
func (GitRepository) StageFile ¶
func (g GitRepository) StageFile(path string) error
func (GitRepository) WalkAgeFiles ¶
func (g GitRepository) WalkAgeFiles(onMatch fs.WalkDirFunc) error
type ReadWriteDirFS ¶
type ReadWriteDirFS struct {
// contains filtered or unexported fields
}
func NewReadWriteDirFS ¶
func NewReadWriteDirFS(rootPath string) *ReadWriteDirFS
func (ReadWriteDirFS) Create ¶ added in v0.1.7
func (f ReadWriteDirFS) Create(filePath string, opts ...ports.OpenRWOptions) (ports.ReadWriteFile, error)
func (ReadWriteDirFS) Remove ¶
func (f ReadWriteDirFS) Remove(filePath string) error
func (ReadWriteDirFS) Rename ¶
func (f ReadWriteDirFS) Rename(oldPath, newPath string) error
func (ReadWriteDirFS) TempFile ¶
func (f ReadWriteDirFS) TempFile(dir, pattern string) (ports.ReadWriteFile, error)
type RecipientsFile ¶
type RecipientsFile struct {
FS ports.ReadWriteFS
}
func NewRecipientsFile ¶
func NewRecipientsFile(fs ports.ReadWriteFS) *RecipientsFile
Click to show internal directories.
Click to hide internal directories.