mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-07 22:53:08 -06:00
20 lines
521 B
Go
20 lines
521 B
Go
|
package remote
|
||
|
|
||
|
// Client is the interface that must be implemented for a remote state
|
||
|
// driver. It supports dumb put/get/delete, and the higher level structs
|
||
|
// handle persisting the state properly here.
|
||
|
type Client interface {
|
||
|
Get() (*Payload, error)
|
||
|
Put([]byte) error
|
||
|
Delete() error
|
||
|
}
|
||
|
|
||
|
// Payload is the return value from the remote state storage.
|
||
|
type Payload struct {
|
||
|
MD5 []byte
|
||
|
Data []byte
|
||
|
}
|
||
|
|
||
|
// Factory is the factory function to create a remote client.
|
||
|
type Factory func(map[string]string) (Client, error)
|