extclient.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package models
  2. // ExtClient - struct for external clients
  3. type ExtClient struct {
  4. ClientID string `json:"clientid" bson:"clientid"`
  5. PrivateKey string `json:"privatekey" bson:"privatekey"`
  6. PublicKey string `json:"publickey" bson:"publickey"`
  7. Network string `json:"network" bson:"network"`
  8. DNS string `json:"dns" bson:"dns"`
  9. Address string `json:"address" bson:"address"`
  10. Address6 string `json:"address6" bson:"address6"`
  11. ExtraAllowedIPs []string `json:"extraallowedips" bson:"extraallowedips"`
  12. AllowedIPs []string `json:"allowed_ips"`
  13. IngressGatewayID string `json:"ingressgatewayid" bson:"ingressgatewayid"`
  14. IngressGatewayEndpoint string `json:"ingressgatewayendpoint" bson:"ingressgatewayendpoint"`
  15. LastModified int64 `json:"lastmodified" bson:"lastmodified"`
  16. Enabled bool `json:"enabled" bson:"enabled"`
  17. OwnerID string `json:"ownerid" bson:"ownerid"`
  18. DeniedACLs map[string]struct{} `json:"deniednodeacls" bson:"acls,omitempty"`
  19. RemoteAccessClientID string `json:"remote_access_client_id"` // unique ID (MAC address) of RAC machine
  20. PostUp string `json:"postup" bson:"postup"`
  21. PostDown string `json:"postdown" bson:"postdown"`
  22. Tags map[TagID]struct{} `json:"tags"`
  23. }
  24. // CustomExtClient - struct for CustomExtClient params
  25. type CustomExtClient struct {
  26. ClientID string `json:"clientid,omitempty"`
  27. PublicKey string `json:"publickey,omitempty"`
  28. DNS string `json:"dns,omitempty"`
  29. ExtraAllowedIPs []string `json:"extraallowedips,omitempty"`
  30. Enabled bool `json:"enabled,omitempty"`
  31. DeniedACLs map[string]struct{} `json:"deniednodeacls" bson:"acls,omitempty"`
  32. RemoteAccessClientID string `json:"remote_access_client_id"` // unique ID (MAC address) of RAC machine
  33. PostUp string `json:"postup" bson:"postup" validate:"max=1024"`
  34. PostDown string `json:"postdown" bson:"postdown" validate:"max=1024"`
  35. Tags map[TagID]struct{} `json:"tags"`
  36. }