Skip to content

mateo08c/go-glauth-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-glauth-mysql

Interacts with the Glauth MySQL database in Go !

Installation

go get github.com/mateo08c/go-glauth-mysql

Usage

package main

import (
  "github.com/mateo08c/go-glauth-mysql/glauth"
  "log"
)

func main() {
  client, err := glauth.New(&glauth.Context{
    Username: "glauth",
    Password: "password",
    Hostname: "example.com",
    Port:     "3306",
    Database: "glauth",
  })
  if err != nil {
    log.Fatal(err)
  }

  users, err := client.GetUsers()
  if err != nil {
    log.Fatal(err)
  }

  for _, user := range users {
    log.Println(user)
  }
}

Environment Variables For Testing

Variable Description
DB_USERNAME MySQL username
DB_PASSWORD MySQL password
DB_HOSTNAME MySQL hostname
DB_PORT MySQL port
DB_NAME MySQL database name

About

Interacts with the Glauth MySQL database in Go !

Topics

Resources

Stars

Watchers

Forks

Languages