The new Ripple frontend.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

messages.go 853B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package main
  2. type message interface {
  3. Type() string
  4. Content() string
  5. }
  6. type errorMessage struct {
  7. C string
  8. }
  9. func (errorMessage) Type() string { return "error" }
  10. func (m errorMessage) Content() string { return m.C }
  11. type neutralMessage struct {
  12. C string
  13. }
  14. func (neutralMessage) Type() string { return "" }
  15. func (m neutralMessage) Content() string { return m.C }
  16. type infoMessage struct {
  17. C string
  18. }
  19. func (infoMessage) Type() string { return "info" }
  20. func (m infoMessage) Content() string { return m.C }
  21. type successMessage struct {
  22. C string
  23. }
  24. func (successMessage) Type() string { return "positive" }
  25. func (m successMessage) Content() string { return m.C }
  26. type warningMessage struct {
  27. C string
  28. }
  29. func (warningMessage) Type() string { return "warning" }
  30. func (m warningMessage) Content() string { return m.C }