Skip to content

Commit

Permalink
refactor(be): remove unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed May 30, 2024
1 parent 5bd0ef5 commit cf11555
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions db/AccessKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/ansible-semaphore/semaphore/pkg/task_logger"
"github.com/ansible-semaphore/semaphore/util"
"io"
"math/big"
"path"
)

Expand Down Expand Up @@ -63,10 +62,9 @@ const (
)

type AccessKeyInstallation struct {
InstallationKey int64
SSHAgent *ssh.Agent
Login string
Password string
SSHAgent *ssh.Agent
Login string
Password string
}

func (key AccessKeyInstallation) Destroy() error {
Expand All @@ -92,12 +90,6 @@ func (key *AccessKey) startSSHAgent(logger task_logger.Logger) (ssh.Agent, error
}

func (key *AccessKey) Install(usage AccessKeyRole, logger task_logger.Logger) (installation AccessKeyInstallation, err error) {
rnd, err := rand.Int(rand.Reader, big.NewInt(1000000000))
if err != nil {
return
}

installation.InstallationKey = rnd.Int64()

if key.Type == AccessKeyNone {
return
Expand Down

0 comments on commit cf11555

Please sign in to comment.