vault/command/agent/sink/mock/mock_sink.go
Hamid Ghaf e55c18ed12
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

28 lines
403 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package mock
import (
"github.com/hashicorp/vault/command/agent/sink"
)
type mockSink struct {
token string
}
func NewSink(token string) sink.Sink {
return &mockSink{
token: token,
}
}
func (m *mockSink) WriteToken(token string) error {
m.token = token
return nil
}
func (m *mockSink) Token() string {
return m.token
}