forked from irinazheltisheva/powergate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
54 lines (45 loc) · 1.21 KB
/
types.go
File metadata and controls
54 lines (45 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package api
import (
"errors"
"github.com/ipfs/go-cid"
"github.com/textileio/powergate/ffs"
)
var (
// ErrNotFound returned when instance configuration doesn't exist.
ErrNotFound = errors.New("stored item not found")
)
// InstanceConfig has general information about a Api instance.
type InstanceConfig struct {
ID ffs.APIID
Addrs map[string]AddrInfo
DefaultStorageConfig ffs.StorageConfig
}
// AddrInfo provides information about a wallet address.
type AddrInfo struct {
Name string
Addr string
Type string
}
// InstanceInfo has general information about a running Api instance.
type InstanceInfo struct {
ID ffs.APIID
DefaultStorageConfig ffs.StorageConfig
Balances []BalanceInfo
Pins []cid.Cid
}
// BalanceInfo contains the balance for the associated wallet address.
type BalanceInfo struct {
AddrInfo
Balance uint64
}
// NewAddressConfig contains options for creating a new wallet address.
type NewAddressConfig struct {
makeDefault bool
addressType string
}
// GetLogsConfig contains configuration for a stream-log
// of human-friendly messages for a Cid execution.
type GetLogsConfig struct {
jid ffs.JobID
history bool
}