Remove disabled property and sync up field ordering and numbering (#259)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-08-12 13:00:49 -04:00
1 parent 012967e91b
commit c195c4bc9b
44 files changed
+742 -1056

No files matched your search

+1 -2
View File
@@ -17,14 +17,13 @@ import (
type Account struct {
Id string `json:"id,omitempty"`
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
AuthMethodId string `json:"auth_method_id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
Type string `json:"type,omitempty"`
AuthMethodId string `json:"auth_method_id,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
}
-12
View File
@@ -77,18 +77,6 @@ func DefaultDescription() Option {
}
}
func WithDisabled(inDisabled bool) Option {
return func(o *options) {
o.valueMap["disabled"] = inDisabled
}
}
func DefaultDisabled() Option {
return func(o *options) {
o.valueMap["disabled"] = nil
}
}
func WithPasswordAccountLoginName(inLoginName string) Option {
return func(o *options) {
raw, ok := o.valueMap["attributes"]
-1
View File
@@ -21,7 +21,6 @@ type Group struct {
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
MemberIds []string `json:"member_ids,omitempty"`
Members []*Member `json:"members,omitempty"`
-1
View File
@@ -84,7 +84,6 @@ func comparableSlice(in []*groups.Group) []groups.Group {
Description: i.Description,
CreatedTime: i.CreatedTime,
UpdatedTime: i.UpdatedTime,
Disabled: i.Disabled,
}
filtered = append(filtered, p)
}
-12
View File
@@ -65,18 +65,6 @@ func DefaultDescription() Option {
}
}
func WithDisabled(inDisabled bool) Option {
return func(o *options) {
o.valueMap["disabled"] = inDisabled
}
}
func DefaultDisabled() Option {
return func(o *options) {
o.valueMap["disabled"] = nil
}
}
func WithName(inName string) Option {
return func(o *options) {
o.valueMap["name"] = inName
+1 -2
View File
@@ -17,13 +17,12 @@ import (
type Host struct {
Id string `json:"id,omitempty"`
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Address string `json:"address,omitempty"`
}
+1 -2
View File
@@ -17,13 +17,12 @@ import (
type HostCatalog struct {
Id string `json:"id,omitempty"`
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
}
+1 -2
View File
@@ -17,13 +17,12 @@ import (
type HostSet struct {
Id string `json:"id,omitempty"`
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Size uint32 `json:"size,omitempty"`
Hosts []*Host `json:"hosts,omitempty"`
}
-12
View File
@@ -89,18 +89,6 @@ func DefaultDescription() Option {
}
}
func WithDisabled(inDisabled bool) Option {
return func(o *options) {
o.valueMap["disabled"] = inDisabled
}
}
func DefaultDisabled() Option {
return func(o *options) {
o.valueMap["disabled"] = nil
}
}
func WithName(inName string) Option {
return func(o *options) {
o.valueMap["name"] = inName
+2 -2
View File
@@ -51,8 +51,8 @@ type structInfo struct {
outputOnly bool
// versionEnabled indicates that we should build a Version handler in
// update. Eventually everything should support this and this param can go
// away.
// update. Some structs are embedded in others and shouldn't have version
// fields.
versionEnabled bool
// The parameters passed into the path. These should be non-pluralized resource names.
-12
View File
@@ -65,18 +65,6 @@ func DefaultDescription() Option {
}
}
func WithDisabled(inDisabled bool) Option {
return func(o *options) {
o.valueMap["disabled"] = inDisabled
}
}
func DefaultDisabled() Option {
return func(o *options) {
o.valueMap["disabled"] = nil
}
}
func WithGrantScopeId(inGrantScopeId string) Option {
return func(o *options) {
o.valueMap["grant_scope_id"] = inGrantScopeId
+1 -2
View File
@@ -21,9 +21,8 @@ type Role struct {
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
GrantScopeId string `json:"grant_scope_id,omitempty"`
Version uint32 `json:"version,omitempty"`
GrantScopeId string `json:"grant_scope_id,omitempty"`
PrincipalIds []string `json:"principal_ids,omitempty"`
Principals []*Principal `json:"principals,omitempty"`
GrantStrings []string `json:"grant_strings,omitempty"`
-1
View File
@@ -234,7 +234,6 @@ func comparableSlice(in []*roles.Role) []roles.Role {
Description: i.Description,
CreatedTime: i.CreatedTime,
UpdatedTime: i.UpdatedTime,
Disabled: i.Disabled,
}
filtered = append(filtered, p)
}
-12
View File
@@ -65,18 +65,6 @@ func DefaultDescription() Option {
}
}
func WithDisabled(inDisabled bool) Option {
return func(o *options) {
o.valueMap["disabled"] = inDisabled
}
}
func DefaultDisabled() Option {
return func(o *options) {
o.valueMap["disabled"] = nil
}
}
func WithName(inName string) Option {
return func(o *options) {
o.valueMap["name"] = inName
-1
View File
@@ -54,7 +54,6 @@ func comparableSlice(in []*scopes.Scope) []scopes.Scope {
Description: i.Description,
CreatedTime: i.CreatedTime,
UpdatedTime: i.UpdatedTime,
Disabled: i.Disabled,
}
filtered = append(filtered, p)
}
-1
View File
@@ -20,7 +20,6 @@ type Scope struct {
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
}
-12
View File
@@ -65,18 +65,6 @@ func DefaultDescription() Option {
}
}
func WithDisabled(inDisabled bool) Option {
return func(o *options) {
o.valueMap["disabled"] = inDisabled
}
}
func DefaultDisabled() Option {
return func(o *options) {
o.valueMap["disabled"] = nil
}
}
func WithName(inName string) Option {
return func(o *options) {
o.valueMap["name"] = inName
-1
View File
@@ -21,7 +21,6 @@ type User struct {
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Version uint32 `json:"version,omitempty"`
}
-1
View File
@@ -68,7 +68,6 @@ func comparableSlice(in []*users.User) []users.User {
Description: i.Description,
CreatedTime: i.CreatedTime,
UpdatedTime: i.UpdatedTime,
Disabled: i.Disabled,
}
filtered = append(filtered, p)
}