Skip to content

Commit

Permalink
fix: remove obsolete types (#887)
Browse files Browse the repository at this point in the history
Closes #716
  • Loading branch information
aeneasr authored Dec 8, 2020
1 parent 105181d commit b8bac7a
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 35 deletions.
2 changes: 1 addition & 1 deletion selfservice/flow/login/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type Flow struct {
Methods map[identity.CredentialsType]*FlowMethod `json:"methods" faker:"login_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw FlowMethodsSlice `json:"-" faker:"-" has_many:"selfservice_login_flow_methods" fk_id:"selfservice_login_flow_id"`
MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_login_flow_methods" fk_id:"selfservice_login_flow_id"`

// CreatedAt is a helper struct field for gobuffalo.pop.
CreatedAt time.Time `json:"-" db:"created_at"`
Expand Down
6 changes: 0 additions & 6 deletions selfservice/flow/login/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,8 @@ func (u FlowMethod) TableName() string {
return "selfservice_login_flow_methods"
}

type FlowMethodsSlice []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[identity.CredentialsType]*FlowMethod

func (u FlowMethodsSlice) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_login_flow_methods"
}

func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_login_flow_methods"
Expand Down
2 changes: 1 addition & 1 deletion selfservice/flow/recovery/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type Flow struct {
Methods map[string]*FlowMethod `json:"methods" faker:"recovery_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_recovery_flow_methods" fk_id:"selfservice_recovery_flow_id"`
MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_recovery_flow_methods" fk_id:"selfservice_recovery_flow_id"`

// State represents the state of this request:
//
Expand Down
6 changes: 0 additions & 6 deletions selfservice/flow/recovery/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,13 @@ func (u FlowMethod) TableName() string {
return "selfservice_recovery_flow_methods"
}

type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[string]*FlowMethod

func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_recovery_flow_methods"
}

func (u FlowMethodsRaw) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_recovery_flow_methods"
}

// swagger:ignore
type FlowMethodConfigurator interface {
form.ErrorParser
Expand Down
2 changes: 1 addition & 1 deletion selfservice/flow/registration/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type Flow struct {
Methods map[identity.CredentialsType]*FlowMethod `json:"methods" faker:"registration_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_registration_flow_methods" fk_id:"selfservice_registration_flow_id"`
MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_registration_flow_methods" fk_id:"selfservice_registration_flow_id"`

// CreatedAt is a helper struct field for gobuffalo.pop.
CreatedAt time.Time `json:"-" faker:"-" db:"created_at"`
Expand Down
6 changes: 0 additions & 6 deletions selfservice/flow/registration/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,13 @@ func (u FlowMethod) TableName() string {
return "selfservice_registration_flow_methods"
}

type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[identity.CredentialsType]*FlowMethod

func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_registration_flow_methods"
}

func (u FlowMethodsRaw) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_registration_flow_methods"
}

// swagger:ignore
type FlowMethodConfigurator interface {
form.ErrorParser
Expand Down
2 changes: 1 addition & 1 deletion selfservice/flow/settings/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type Flow struct {
Methods map[string]*FlowMethod `json:"methods" faker:"settings_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_settings_flow_methods" fk_id:"selfservice_settings_flow_id"`
MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_settings_flow_methods" fk_id:"selfservice_settings_flow_id"`

// Identity contains all of the identity's data in raw form.
//
Expand Down
6 changes: 0 additions & 6 deletions selfservice/flow/settings/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,13 @@ func (u FlowMethod) TableName() string {
return "selfservice_settings_flow_methods"
}

type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[string]*FlowMethod

func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_settings_flow_methods"
}

func (u FlowMethodsRaw) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_settings_flow_methods"
}

// swagger:ignore
type FlowMethodConfigurator interface {
form.ErrorParser
Expand Down
2 changes: 1 addition & 1 deletion selfservice/flow/verification/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type Flow struct {
Methods map[string]*FlowMethod `json:"methods" faker:"verification_flow_methods" db:"-"`

// MethodsRaw is a helper struct field for gobuffalo.pop.
MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_verification_flow_methods" fk_id:"selfservice_verification_flow_id"`
MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_verification_flow_methods" fk_id:"selfservice_verification_flow_id"`

// State represents the state of this request:
//
Expand Down
6 changes: 0 additions & 6 deletions selfservice/flow/verification/flow_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,13 @@ func (u FlowMethod) TableName() string {
return "selfservice_verification_flow_methods"
}

type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478
type FlowMethods map[string]*FlowMethod

func (u FlowMethods) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_verification_flow_methods"
}

func (u FlowMethodsRaw) TableName() string {
// This must be stay a value receiver, using a pointer receiver will cause issues with pop.
return "selfservice_verification_flow_methods"
}

// swagger:ignore
type FlowMethodConfigurator interface {
form.ErrorParser
Expand Down

0 comments on commit b8bac7a

Please sign in to comment.