Skip to content

Commit

Permalink
Add comments for the user manager interface methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Feb 2, 2022
1 parent 215db00 commit c6e6293
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ require (
go 1.16

replace (
github.com/cs3org/go-cs3apis => github.com/ishank011/go-cs3apis v0.0.0-20211026072245-95303cdc06dc
github.com/eventials/go-tus => github.com/andrewmostello/go-tus v0.0.0-20200314041820-904a9904af9a
github.com/oleiade/reflections => github.com/oleiade/reflections v1.0.1
google.golang.org/grpc => google.golang.org/grpc v1.26.0 // temporary downgrade
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/ishank011/go-cs3apis v0.0.0-20211026072245-95303cdc06dc h1:S2KTqUo/trscihgP250SJoXA+JRVNIk/FWXIgFy32D0=
github.com/ishank011/go-cs3apis v0.0.0-20211026072245-95303cdc06dc/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/jedib0t/go-pretty v4.3.0+incompatible h1:CGs8AVhEKg/n9YbUenWmNStRW2PHJzaeDodcfvRAbIo=
github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
Expand Down
6 changes: 6 additions & 0 deletions pkg/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ import (
// Manager is the interface to implement to manipulate users.
type Manager interface {
plugin.Plugin
// GetUser returns the user metadata identified by a uid.
// The groups of the user are omitted if specified, as these might not be required for certain operations
// and might involve computational overhead.
GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error)
// GetUserByClaim returns the user identified by a specific value for a given claim.
GetUserByClaim(ctx context.Context, claim, value string, skipFetchingGroups bool) (*userpb.User, error)
// GetUserGroups returns the groups a user identified by a uid belongs to.
GetUserGroups(ctx context.Context, uid *userpb.UserId) ([]string, error)
// FindUsers returns all the user objects which match a query parameter.
FindUsers(ctx context.Context, query string, skipFetchingGroups bool) ([]*userpb.User, error)
}

0 comments on commit c6e6293

Please sign in to comment.