Skip to content

Commit

Permalink
feature(pkg): add connector structure to namespace model
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybarreto committed May 27, 2024
1 parent 886b067 commit 8e9d636
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/models/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ type Namespace struct {
DevicesCount int `json:"devices_count" bson:"devices_count,omitempty"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
Billing *Billing `json:"billing" bson:"billing,omitempty"`
Connector *Connector `json:"connector" bson:"connector,omitempty"`
}

type Connector struct {
Enabled bool `json:"enabled" bson:"enabled" validate:"required"`
Address string `json:"address" bson:"address" validate:"required,hostname_port"`
}

// HasMaxDevices checks if the namespace has a maximum number of devices.
Expand Down

0 comments on commit 8e9d636

Please sign in to comment.