repository

package
v1.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package repository reads and writes registered SSH credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHCredentialRepository

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

SSHCredentialRepository reads and writes registered SSH credentials.

func NewSSHCredentialRepository

func NewSSHCredentialRepository(db *gorm.DB) *SSHCredentialRepository

NewSSHCredentialRepository returns a repository backed by db.

func (*SSHCredentialRepository) Delete

Delete removes a key.

func (*SSHCredentialRepository) ExistsByName

func (r *SSHCredentialRepository) ExistsByName(ctx context.Context, name string) (bool, error)

ExistsByName reports whether a key of that name is already registered. Declared but never called in the Java service, and preserved here for the same reason.

func (*SSHCredentialRepository) FindAll

FindAll returns every key.

func (*SSHCredentialRepository) FindByID

FindByID returns one key, or gorm.ErrRecordNotFound.

func (*SSHCredentialRepository) FindByOwnerID

func (r *SSHCredentialRepository) FindByOwnerID(ctx context.Context, userID string) ([]model.SSHCredential, error)

FindByOwnerID returns every key registered by one user. There is no listing across owners: a credential is private to whoever registered it.

func (*SSHCredentialRepository) Save

Save inserts or updates a key.

func (*SSHCredentialRepository) WithTx

WithTx returns a repository bound to tx.

Jump to

Keyboard shortcuts

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