Change go module name
This commit is contained in:
@@ -7,7 +7,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/dgrijalva/jwt-go/request"
|
"github.com/dgrijalva/jwt-go/request"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/akhilrex/hammond
|
module hammond
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/controllers"
|
"hammond/controllers"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/service"
|
"hammond/service"
|
||||||
|
|
||||||
"github.com/gin-contrib/location"
|
"github.com/gin-contrib/location"
|
||||||
"github.com/gin-gonic/contrib/static"
|
"github.com/gin-gonic/contrib/static"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package models
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateAlertModel struct {
|
type CreateAlertModel struct {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import "github.com/akhilrex/hammond/db"
|
import "hammond/db"
|
||||||
|
|
||||||
type LoginResponse struct {
|
type LoginResponse struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import "github.com/akhilrex/hammond/db"
|
import "hammond/db"
|
||||||
|
|
||||||
type UpdateSettingModel struct {
|
type UpdateSettingModel struct {
|
||||||
Currency string `json:"currency" form:"currency" query:"currency"`
|
Currency string `json:"currency" form:"currency" query:"currency"`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MileageModel struct {
|
type MileageModel struct {
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ package models
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
|
|
||||||
_ "github.com/go-playground/validator/v10"
|
_ "github.com/go-playground/validator/v10"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateAlert(model models.CreateAlertModel, vehicleId, userId string) (*db.VehicleAlert, error) {
|
func CreateAlert(model models.CreateAlertModel, vehicleId, userId string) (*db.VehicleAlert, error) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DrivvoParseExpenses(content []byte, user *db.User, vehicle *db.Vehicle) ([]db.Expense, []string) {
|
func DrivvoParseExpenses(content []byte, user *db.User, vehicle *db.Vehicle) ([]db.Expense, []string) {
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/internal/sanitize"
|
"hammond/internal/sanitize"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
|
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
|
|
||||||
"github.com/leekchan/accounting"
|
"github.com/leekchan/accounting"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package service
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func WriteToDB(fillups []db.Fillup, expenses []db.Expense) []string {
|
func WriteToDB(fillups []db.Fillup, expenses []db.Expense) []string {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CanInitializeSystem() (bool, error) {
|
func CanInitializeSystem() (bool, error) {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/common"
|
"hammond/common"
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetMileageByVehicleId(vehicleId string, since time.Time, mileageOption string) (mileage []models.MileageModel, err error) {
|
func GetMileageByVehicleId(vehicleId string, since time.Time, mileageOption string) (mileage []models.MileageModel, err error) {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package service
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateUser(userModel *models.RegisterRequest, role db.Role) error {
|
func CreateUser(userModel *models.RegisterRequest, role db.Role) error {
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ package service
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"hammond/db"
|
||||||
"github.com/akhilrex/hammond/models"
|
"hammond/models"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/clause"
|
"gorm.io/gorm/clause"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user