@@ -3,12 +3,12 @@ package requests
33import "github.com/shellhub-io/shellhub/pkg/api/query"
44
55type CreateTag struct {
6- TenantID string `param:"tenant" validate:"required,uuid"`
6+ TenantID string `param:"tenant" header:"X-Tenant-ID" validate:"required,uuid"`
77 Name string `json:"name" validate:"required,min=3,max=255,alphanum,ascii,excludes=/@&:"`
88}
99
1010type PushTag struct {
11- TenantID string `param:"tenant" validate:"required,uuid"`
11+ TenantID string `param:"tenant" header:"X-Tenant-ID" validate:"required,uuid"`
1212 Name string `param:"name" validate:"required,min=3,max=255,alphanum,ascii,excludes=/@&:"`
1313 // TargetID is the identifier of the target to push the tag on.
1414 // For the reason cannot of it can be a list of things (UID for device, ID for firewall, etc...), it
@@ -17,7 +17,7 @@ type PushTag struct {
1717}
1818
1919type PullTag struct {
20- TenantID string `param:"tenant" validate:"required,uuid"`
20+ TenantID string `param:"tenant" header:"X-Tenant-ID" validate:"required,uuid"`
2121 Name string `param:"name" validate:"required,min=3,max=255,alphanum,ascii,excludes=/@&:"`
2222 // TargetID is the identifier of the target to pull the tag of.
2323 // For the reason cannot of it can be a list of things (UID for device, ID for firewall, etc...), it
@@ -26,21 +26,21 @@ type PullTag struct {
2626}
2727
2828type ListTags struct {
29- TenantID string `param:"tenant" validate:"required,uuid"`
29+ TenantID string `param:"tenant" header:"X-Tenant-ID" validate:"required,uuid"`
3030 query.Paginator
3131 query.Filters
3232 query.Sorter
3333}
3434
3535type UpdateTag struct {
36- TenantID string `param:"tenant" validate:"required,uuid"`
36+ TenantID string `param:"tenant" header:"X-Tenant-ID" validate:"required,uuid"`
3737 Name string `param:"name" validate:"required"`
3838 // Similar to [UpdateTag.Name], but is used to update the tag's name instead of retrieve the tag.
3939 NewName string `json:"name" validate:"omitempty,min=3,max=255,alphanum,ascii,excludes=/@&:"`
4040}
4141
4242type DeleteTag struct {
43- TenantID string `param:"tenant" validate:"required,uuid"`
43+ TenantID string `param:"tenant" header:"X-Tenant-ID" validate:"required,uuid"`
4444 Name string `param:"name" validate:"required"`
4545}
4646
0 commit comments