Skip to content

ZeroTechh/UserMainService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UserMainService

A velocity which will be handling user main data.

Functions

Add

Takes in user data, then add it into database. Returns user ID.

addResponse, err := client.Add(ctx, &UserData)

Get

Takes in either user ID, username or email, then returns user data.

getResponse, err := client.Get(ctx, &proto.GetRequest{
    Username: "username",
    UserID: "userid",
    Email: "email", // Either can be given
})

Update

Takes in user ID and data to update.

updateResponse, err := client.Update(ctx, &proto.UpdateRequest{
    UserID: "Userid",
    Update: UpdateData,
})

Auth

Takes in either username or email and password. Then returns if credentials are valid.

authResponse, err := client.Auth(ctx, &proto.AuthRequest{
    Username: "Username",
    Email: "Email",
    Password: "password",
})

Validate

Takes in data and returns if it is valid.

valid, _ := client.Validate(ctx, &UserData)

About

A velocity which will be handling user main data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages