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

app_models.go 857 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package schsdk
  2. import (
  3. "gitlink.org.cn/cloudream/common/pkgs/types"
  4. "gitlink.org.cn/cloudream/common/utils/serder"
  5. )
  6. type AppInfo interface {
  7. GetAppID() string
  8. }
  9. var AppInfoTypeUnion = types.NewTypeUnion[AppInfo](
  10. (*FederatedLearningAppInfo)(nil),
  11. (*OtherAppInfo)(nil),
  12. )
  13. var _ = serder.UseTypeUnionInternallyTagged(&JobInfoTypeUnion, "type")
  14. type AppInfoBase struct {
  15. ID string `json:"id"`
  16. }
  17. func (i *AppInfoBase) GetAppID() string {
  18. return i.ID
  19. }
  20. type FederatedLearningAppInfo struct {
  21. serder.Metadata `union:"federatedLearning"`
  22. AppInfoBase
  23. Type string `json:"type"`
  24. Name string `json:"name"`
  25. Description string `json:"description"`
  26. }
  27. type OtherAppInfo struct {
  28. serder.Metadata `union:"other"`
  29. AppInfoBase
  30. Type string `json:"type"`
  31. Name string `json:"name"`
  32. Description string `json:"description"`
  33. }