goauth

package module
v0.0.0-...-42108d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 7 Imported by: 0

README

goauth

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

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL