Skip to content

Commit

Permalink
Export mysql schema variable (and bump go to 1.17) (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmrod authored Aug 19, 2022
1 parent d0bcd3c commit f31ea96
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/micromdm/nanomdm

go 1.15
go 1.17

require (
github.com/RobotsAndPencils/buford v0.14.0
Expand All @@ -9,3 +9,8 @@ require (
github.com/lib/pq v1.10.6
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
)

require (
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb // indirect
golang.org/x/text v0.3.0 // indirect
)
6 changes: 6 additions & 0 deletions storage/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package mysql
import (
"context"
"database/sql"
_ "embed"
"errors"
"fmt"

Expand All @@ -13,6 +14,11 @@ import (
"github.com/micromdm/nanomdm/mdm"
)

// Schema holds the schema for the NanoMDM MySQL storage.
//
//go:embed schema.sql
var Schema string

var ErrNoCert = errors.New("no certificate in MDM Request")

type MySQLStorage struct {
Expand Down
6 changes: 6 additions & 0 deletions storage/pgsql/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package pgsql
import (
"context"
"database/sql"
_ "embed"
"errors"
"fmt"

Expand All @@ -13,6 +14,11 @@ import (
"github.com/micromdm/nanomdm/mdm"
)

// Schema holds the schema for the NanoMDM PostgresSQL storage.
//
//go:embed schema.sql
var Schema string

var ErrNoCert = errors.New("no certificate in MDM Request")

type PgSQLStorage struct {
Expand Down

0 comments on commit f31ea96

Please sign in to comment.