A velocity which will be handling user main data.
Takes in user data, then add it into database. Returns user ID.
addResponse, err := client.Add(ctx, &UserData)
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
})
Takes in user ID and data to update.
updateResponse, err := client.Update(ctx, &proto.UpdateRequest{
UserID: "Userid",
Update: UpdateData,
})
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",
})
Takes in data and returns if it is valid.
valid, _ := client.Validate(ctx, &UserData)