netmaker/models/extclient.go
Aceix f4a5520f86
Kwesi/net 326 bug client ac ls (#2462)
* feat(NET-326): return 200 [] instead of 500 when there are not network acls

* fix(NET-326): implement allow/deny client acl functions

* fix(NET-326): implement extclient acl update

* fix(NET-326): kame fixes, send peer updates
2023-07-26 10:32:54 +05:30

30 lines
1.7 KiB
Go

package models
// ExtClient - struct for external clients
type ExtClient struct {
ClientID string `json:"clientid" bson:"clientid"`
PrivateKey string `json:"privatekey" bson:"privatekey"`
PublicKey string `json:"publickey" bson:"publickey"`
Network string `json:"network" bson:"network"`
DNS string `json:"dns" bson:"dns"`
Address string `json:"address" bson:"address"`
Address6 string `json:"address6" bson:"address6"`
ExtraAllowedIPs []string `json:"extraallowedips" bson:"extraallowedips"`
IngressGatewayID string `json:"ingressgatewayid" bson:"ingressgatewayid"`
IngressGatewayEndpoint string `json:"ingressgatewayendpoint" bson:"ingressgatewayendpoint"`
LastModified int64 `json:"lastmodified" bson:"lastmodified"`
Enabled bool `json:"enabled" bson:"enabled"`
OwnerID string `json:"ownerid" bson:"ownerid"`
DeniedACLs map[string]struct{} `json:"deniednodeacls" bson:"acls,omitempty"`
}
// CustomExtClient - struct for CustomExtClient params
type CustomExtClient struct {
ClientID string `json:"clientid,omitempty"`
PublicKey string `json:"publickey,omitempty"`
DNS string `json:"dns,omitempty"`
ExtraAllowedIPs []string `json:"extraallowedips,omitempty"`
Enabled bool `json:"enabled,omitempty"`
DeniedACLs map[string]struct{} `json:"deniednodeacls" bson:"acls,omitempty"`
}