Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenFileWriter ¶
type TokenFileWriter struct {
// contains filtered or unexported fields
}
TokenFileWriter is a mechanism to generates a token and writes it into a file specified by configuration
func NewWriter ¶
func NewWriter(lc logger.LoggingClient, sc secrets.SecretStoreClient, fileOpener fileioperformer.FileIoPerformer) TokenFileWriter
NewWriter instantiates a TokenFileWriter instance
func (TokenFileWriter) CreateAndWrite ¶
func (w TokenFileWriter) CreateAndWrite(rootToken string, tokenFilePath string, createTokenFunc tokencreatable.CreateTokenFunc) (tokencreatable.RevokeFunc, error)
CreateAndWrite generates a new token and writes it to the file specified by tokenFilePath the generation of the token requires root token privilege it overwrites the file if already exists returns error if anything fails during the whole process
Click to show internal directories.
Click to hide internal directories.