Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove obsolete types #887

Merged
merged 1 commit into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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