account.go 307 B

1234567891011121314
  1. package protocol
  2. import "google.golang.org/protobuf/proto"
  3. // Account is a user identity used for authentication.
  4. type Account interface {
  5. Equals(Account) bool
  6. ToProto() proto.Message
  7. }
  8. // AsAccount is an object can be converted into account.
  9. type AsAccount interface {
  10. AsAccount() (Account, error)
  11. }