Documentation
¶
Index ¶
- Variables
- type Server
- func (s *Server) GetProfile(ctx context.Context, req *profilepb.GetProfileRequest) (*profilepb.GetProfileResponse, error)
- func (s *Server) LinkSocialAccount(ctx context.Context, req *profilepb.LinkSocialAccountRequest) (*profilepb.LinkSocialAccountResponse, error)
- func (s *Server) SetDisplayName(ctx context.Context, req *profilepb.SetDisplayNameRequest) (*profilepb.SetDisplayNameResponse, error)
- func (s *Server) UnlinkSocialAccount(ctx context.Context, req *profilepb.UnlinkSocialAccountRequest) (*profilepb.UnlinkSocialAccountResponse, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExistingSocialLink = errors.New("existing social link")
View Source
var ErrInvalidDisplayName = errors.New("invalid display name")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { profilepb.UnimplementedProfileServer // contains filtered or unexported fields }
func (*Server) GetProfile ¶
func (s *Server) GetProfile(ctx context.Context, req *profilepb.GetProfileRequest) (*profilepb.GetProfileResponse, error)
func (*Server) LinkSocialAccount ¶
func (s *Server) LinkSocialAccount(ctx context.Context, req *profilepb.LinkSocialAccountRequest) (*profilepb.LinkSocialAccountResponse, error)
func (*Server) SetDisplayName ¶
func (s *Server) SetDisplayName(ctx context.Context, req *profilepb.SetDisplayNameRequest) (*profilepb.SetDisplayNameResponse, error)
func (*Server) UnlinkSocialAccount ¶ added in v1.3.0
func (s *Server) UnlinkSocialAccount(ctx context.Context, req *profilepb.UnlinkSocialAccountRequest) (*profilepb.UnlinkSocialAccountResponse, error)
type Store ¶
type Store interface { // GetProfile returns the user profile for a user, or ErrNotFound. GetProfile(ctx context.Context, id *commonpb.UserId) (*profilepb.UserProfile, error) // SetDisplayName sets the display name for a user, provided they exist. // // ErrInvalidDisplayName is returned if there is an issue with the display name. SetDisplayName(ctx context.Context, id *commonpb.UserId, displayName string) error // LinkXAccount links a X account to a user ID LinkXAccount(ctx context.Context, userID *commonpb.UserId, xProfile *profilepb.XProfile, accessToken string) error // UnlinkXAccount removes the link to the X account UnlinkXAccount(ctx context.Context, userID *commonpb.UserId, xUserID string) error // GetXProfile gets a user's X profile if it has been linked GetXProfile(ctx context.Context, userID *commonpb.UserId) (*profilepb.XProfile, error) // GetUserLinkedToXAccount gets the user linked to X account GetUserLinkedToXAccount(ctx context.Context, xUserID string) (*commonpb.UserId, error) }
Click to show internal directories.
Click to hide internal directories.