diff options
author | Joe Chen <jc@unknwon.io> | 2022-11-05 23:33:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 23:33:05 +0800 |
commit | 5fb29db2db04bc128af410867f1f602320eb5d66 (patch) | |
tree | 9d0b86702d872f8f5ab7d0691e511c52f38fde34 /internal/db/orgs.go | |
parent | b5d47b969258f3d644ad797b29901eb607f6b94f (diff) |
refactor(db): migrate methods off and delete deprecated methods from `user.go` (#7231)
Diffstat (limited to 'internal/db/orgs.go')
-rw-r--r-- | internal/db/orgs.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/orgs.go b/internal/db/orgs.go index 9fbedf11..e7e8dd16 100644 --- a/internal/db/orgs.go +++ b/internal/db/orgs.go @@ -18,7 +18,7 @@ import ( // NOTE: All methods are sorted in alphabetical order. type OrgsStore interface { // List returns a list of organizations filtered by options. - List(ctx context.Context, opts ListOrgOptions) ([]*Organization, error) + List(ctx context.Context, opts ListOrgsOptions) ([]*Organization, error) } var Orgs OrgsStore @@ -35,14 +35,14 @@ func NewOrgsStore(db *gorm.DB) OrgsStore { return &orgs{DB: db} } -type ListOrgOptions struct { +type ListOrgsOptions struct { // Filter by the membership with the given user ID. MemberID int64 // Whether to include private memberships. IncludePrivateMembers bool } -func (db *orgs) List(ctx context.Context, opts ListOrgOptions) ([]*Organization, error) { +func (db *orgs) List(ctx context.Context, opts ListOrgsOptions) ([]*Organization, error) { if opts.MemberID <= 0 { return nil, errors.New("MemberID must be greater than 0") } |