v0.1.1
Vernon Keenan 2023-09-12 04:05:33 +00:00
parent 2471c0520f
commit 4a28f82878
18 changed files with 121 additions and 949 deletions

View File

@ -1,6 +1,6 @@
# lib
vernonkeenan Shared Libraries (go)
WorkDifferentWithAI Shared Libraries (go)
## Dependent Systems
@ -21,7 +21,7 @@ go mod tidy
```
* Commit and push new branch to GitHub
* On GitHub goto <https://github.com/vernonkeenan/lib/settings/branches> set the new branch to default.
* On GitHub goto <https://github.com/vernonkeenan/lib/releases> and publish a new release for the new branch. Make the new tag the branch name.
* On Gitea goto <https://code.tnxs.net/vernonkeenan/lib/settings> and click Synchronize Now.
* Update the ``go.mod`` line with ``code.tnxs.net/vernonkeenan/lib`` in each project to match the latest version.
* On GitHub goto <https://github.com/workdifferentwithai/lib/settings/branches> set the new branch to default.
* On GitHub goto <https://github.com/workdifferentwithai/lib/releases> and publish a new release for the new branch. Make the new tag the branch name.
* On Gitea goto <https://code.tnxs.net/workdifferentwithai/lib/settings> and click Synchronize Now.
* Update the ``go.mod`` line with ``code.tnxs.net/work/lib`` in each project to match the latest version.

View File

@ -14,7 +14,7 @@ import (
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_client/user"
"code.tnxs.net/work/lib/api/auth/auth_client/user"
)
// Default auth HTTP client.

View File

@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_models"
"code.tnxs.net/work/lib/api/auth/auth_models"
)
// GetUsersReader is a Reader for the GetUsers structure.

View File

@ -19,7 +19,7 @@ import (
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
"code.tnxs.net/work/lib/api/workflow/workflow_models"
)
// NewPostAppLogsParams creates a new PostAppLogsParams object,

View File

@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
"code.tnxs.net/work/lib/api/workflow/workflow_models"
)
// PostAppLogsReader is a Reader for the PostAppLogs structure.

View File

@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
"code.tnxs.net/work/lib/api/workflow/workflow_models"
)
// GetEmailMessagesReader is a Reader for the GetEmailMessages structure.

View File

@ -19,7 +19,7 @@ import (
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
"code.tnxs.net/work/lib/api/workflow/workflow_models"
)
// NewPostOutgoingEmailMessagesParams creates a new PostOutgoingEmailMessagesParams object,

View File

@ -16,7 +16,7 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_models"
"code.tnxs.net/work/lib/api/workflow/workflow_models"
)
// PostOutgoingEmailMessagesReader is a Reader for the PostOutgoingEmailMessages structure.

View File

@ -14,10 +14,10 @@ import (
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/app_log"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/cors"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/email_message"
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/outgoing_email_message"
"code.tnxs.net/work/lib/api/workflow/workflow_client/app_log"
"code.tnxs.net/work/lib/api/workflow/workflow_client/cors"
"code.tnxs.net/work/lib/api/workflow/workflow_client/email_message"
"code.tnxs.net/work/lib/api/workflow/workflow_client/outgoing_email_message"
)
// Default workflow HTTP client.

View File

@ -1,8 +1,8 @@
package app
import (
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_client/user"
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_models"
"code.tnxs.net/work/lib/api/auth/auth_client/user"
"code.tnxs.net/work/lib/api/auth/auth_models"
httptransport "github.com/go-openapi/runtime/client"
)
@ -10,7 +10,6 @@ import (
//
// When called, ChechAPIUser assumes there is an "auth" service account in the
// app configuration file.
//
func CheckAPIUser(token *string) (*User, error) {
sugar.Debug("app.CheckAPIUser: 📥")
if authUser == nil {

View File

@ -3,7 +3,7 @@ package app
import (
"time"
"code.tnxs.net/vernonkeenan/lib/app/logger"
"code.tnxs.net/work/lib/app/logger"
"go.uber.org/zap/zapcore"
)

View File

@ -4,8 +4,8 @@ package app
import (
"strings"
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_client"
"code.tnxs.net/vernonkeenan/lib/app/logger"
"code.tnxs.net/work/lib/api/auth/auth_client"
"code.tnxs.net/work/lib/app/logger"
"github.com/spf13/viper"
"github.com/taxnexus/go-force/force"
"go.uber.org/zap"
@ -32,9 +32,9 @@ func InitConfig(systemName string, initalLogLevel zapcore.Level) {
sugar.Infof("app.InitConfig: 📥 %s", systemName)
appViper.SetConfigType("yaml")
appViper.SetConfigName(systemName)
appViper.AddConfigPath("/etc/vernonkeenan")
appViper.AddConfigPath("/etc/work")
appViper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
appViper.SetEnvPrefix("vernonkeenan")
appViper.SetEnvPrefix("work")
appViper.AutomaticEnv() // read in environment variables that match
err := appViper.ReadInConfig()
if err != nil {

View File

@ -1,10 +1,7 @@
package app
import "code.tnxs.net/vernonkeenan/lib/api/members/members_models"
// TenantUserActivityWrapper wraps the object with workflow params
type TenantUserActivityWrapper struct {
Obj members_models.TenantUser
APIKey string
SagaID string
SagaType string

View File

@ -1,7 +1,7 @@
package app
import (
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_models"
"code.tnxs.net/work/lib/api/auth/auth_models"
httptransport "github.com/go-openapi/runtime/client"
)

View File

@ -1,13 +1,11 @@
package app
import (
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
"github.com/go-openapi/runtime"
)
// UserActivityWrapper wraps the object with workflow params
type UserActivityWrapper struct {
Obj members_models.User
APIKey string
SagaID string
SagaType string

View File

@ -1,10 +1,7 @@
package app
import "code.tnxs.net/vernonkeenan/lib/api/members/members_models"
// UserRoleActivityWrapper wraps the object with workflow params
type UserRoleActivityWrapper struct {
Obj members_models.UserRole
APIKey string
SagaID string
SagaType string

78
go.mod
View File

@ -1,32 +1,60 @@
module code.tnxs.net/vernonkeenan/lib
module code.tnxs.net/work/lib
go 1.15
go 1.21.0
require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/go-openapi/errors v0.20.3
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/runtime v0.25.0
github.com/go-openapi/spec v0.20.8 // indirect
github.com/go-openapi/errors v0.20.4
github.com/go-openapi/runtime v0.26.0
github.com/go-openapi/strfmt v0.21.7
github.com/go-openapi/swag v0.22.3
github.com/go-openapi/swag v0.22.4
github.com/go-openapi/validate v0.22.1
github.com/go-sql-driver/mysql v1.7.0
github.com/golang/protobuf v1.5.3 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rs/cors v1.8.3
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/viper v1.15.0
github.com/go-sql-driver/mysql v1.7.1
github.com/prometheus/client_golang v1.16.0
github.com/rs/cors v1.10.0
github.com/spf13/viper v1.16.0
github.com/taxnexus/go-force v1.0.7
go.opentelemetry.io/otel v1.14.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.24.0
golang.org/x/net v0.8.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
go.uber.org/zap v1.25.0
)
require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/spec v0.20.8 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
go.mongodb.org/mongo-driver v1.11.3 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

935
go.sum

File diff suppressed because it is too large Load Diff