responses.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2023 Girish M
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package main
  17. type Option struct {
  18. Text string `json:"text"`
  19. Value string `json:"value"`
  20. }
  21. type Context struct {
  22. Action string `json:"action"`
  23. }
  24. type Integration struct {
  25. URL string `json:"url"`
  26. Context Context `json:"context"`
  27. }
  28. type Action struct {
  29. Name string `json:"name"`
  30. Integration Integration `json:"integration"`
  31. Type string `json:"type"`
  32. Options []Option `json:"options"`
  33. }
  34. type Attachment struct {
  35. Actions []Action `json:"actions"`
  36. Links Links `json:"_links"`
  37. }
  38. type OptAttachments struct {
  39. Attachments []Attachment `json:"attachments"`
  40. }