You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
decort-golang-sdk/pkg/cloudapi/secgroup/models.go

95 lines
1.8 KiB

package secgroup
type ListSecurityGroups struct {
// List
Data []ItemSecurityGroup `json:"data"`
// Entry count
EntryCount uint64 `json:"entryCount"`
}
type ItemSecurityGroup struct {
// ID of the security group
ID uint64 `json:"id"`
// Account ID that owns the security group
AccountID uint64 `json:"account_id"`
// Name of the security group
Name string `json:"name"`
// Description of the security group
Description string `json:"description"`
// List of rules
Rules Rules `json:"rules"`
// Created at
CreatedAt uint64 `json:"created_at"`
// Updated at
UpdatedAt uint64 `json:"updated_at"`
// Created by
CreatedBy string `json:"created_by"`
// Updated by
UpdatedBy string `json:"updated_by"`
}
type RecordSecurityGroup struct {
// ID of the security group
ID uint64 `json:"id"`
// Account ID that owns the security group
AccountID uint64 `json:"account_id"`
// Name of the security group
Name string `json:"name"`
// Description of the security group
Description string `json:"description"`
// List of rules
Rules Rules `json:"rules"`
// Created at
CreatedAt uint64 `json:"created_at"`
// Updated at
UpdatedAt uint64 `json:"updated_at"`
// Created by
CreatedBy string `json:"created_by"`
// Updated by
UpdatedBy string `json:"updated_by"`
}
type Rules []Rule
type Rule struct {
// ID of the rule
ID uint64 `json:"id"`
// Traffic direction (inbound/outbound)
Direction string `json:"direction"`
// IP protocol version
Ethertype string `json:"ethertype"`
// Network protocol
Protocol string `json:"protocol"`
// Start port number (for TCP/UDP)
PortRangeMin uint64 `json:"port_range_min"`
// End port number (for TCP/UDP)
PortRangeMax uint64 `json:"port_range_max"`
// Remote IP prefix in CIDR notation
RemoteIPPrefix string `json:"remote_ip_prefix"`
RemoteGroupID uint64 `json:"remote_group_id"`
}