Documentation
¶
Overview ¶
Package goauth provides services for interacting with goauth functionalities.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
goauthpb.UnimplementedAuthServiceServer // Used only for gRPC service.
}
AuthService is a service for interacting with goauth functionalities.
func (AuthService) CreateUser ¶
func (a AuthService) CreateUser(_ context.Context, request *goauthpb.CreateUserRequest) (*goauthpb.User, error)
CreateUser create and store a new User from request.
Example ¶
// Create service
server := new(AuthService)
// Create request
req := &goauthpb.CreateUserRequest{
Email: "john.doe@example.com",
}
// Create user
usr, err := server.CreateUser(context.Background(), req)
if err != nil {
// Handle error.
} else {
// Use usr
fmt.Println(usr.Email)
}
Output: john.doe@example.com
Click to show internal directories.
Click to hide internal directories.