Skip to content

Commit

Permalink
Declare struct before its methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gzdunek committed Jul 18, 2023
1 parent 062cf2b commit 1a71f56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/teleterm/services/connectmycomputer/connectmycomputer.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ func (c *RoleSetupConfig) CheckAndSetDefaults() error {
return nil
}

type TokenProvisioner struct {
Log *logrus.Entry
}

// CreateNodeToken creates a node join token that is valid for 5 minutes.
func (t *TokenProvisioner) CreateNodeToken(ctx context.Context, provisioner Provisioner, cluster *clusters.Cluster) (types.ProvisionToken, error) {
tokenName, err := utils.CryptoRandomHex(auth.TokenLenBytes)
Expand Down Expand Up @@ -299,7 +303,3 @@ type Provisioner interface {
// See services.Provisioner.DeleteToken.
DeleteToken(ctx context.Context, token string) error
}

type TokenProvisioner struct {
Log *logrus.Entry
}

0 comments on commit 1a71f56

Please sign in to comment.