first
parent
2471c0520f
commit
4a28f82878
10
README.md
10
README.md
|
@ -1,6 +1,6 @@
|
||||||
# lib
|
# lib
|
||||||
|
|
||||||
vernonkeenan Shared Libraries (go)
|
WorkDifferentWithAI Shared Libraries (go)
|
||||||
|
|
||||||
## Dependent Systems
|
## Dependent Systems
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ go mod tidy
|
||||||
```
|
```
|
||||||
|
|
||||||
* Commit and push new branch to GitHub
|
* 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/workdifferentwithai/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 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/vernonkeenan/lib/settings> and click Synchronize Now.
|
* On Gitea goto <https://code.tnxs.net/workdifferentwithai/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.
|
* Update the ``go.mod`` line with ``code.tnxs.net/work/lib`` in each project to match the latest version.
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"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.
|
// Default auth HTTP client.
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
"github.com/go-openapi/strfmt"
|
"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.
|
// GetUsersReader is a Reader for the GetUsers structure.
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
cr "github.com/go-openapi/runtime/client"
|
cr "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"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,
|
// NewPostAppLogsParams creates a new PostAppLogsParams object,
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
"github.com/go-openapi/strfmt"
|
"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.
|
// PostAppLogsReader is a Reader for the PostAppLogs structure.
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
"github.com/go-openapi/strfmt"
|
"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.
|
// GetEmailMessagesReader is a Reader for the GetEmailMessages structure.
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
cr "github.com/go-openapi/runtime/client"
|
cr "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"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,
|
// NewPostOutgoingEmailMessagesParams creates a new PostOutgoingEmailMessagesParams object,
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
"github.com/go-openapi/strfmt"
|
"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.
|
// PostOutgoingEmailMessagesReader is a Reader for the PostOutgoingEmailMessages structure.
|
||||||
|
|
|
@ -14,10 +14,10 @@ import (
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/app_log"
|
"code.tnxs.net/work/lib/api/workflow/workflow_client/app_log"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/cors"
|
"code.tnxs.net/work/lib/api/workflow/workflow_client/cors"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/workflow/workflow_client/email_message"
|
"code.tnxs.net/work/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/outgoing_email_message"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Default workflow HTTP client.
|
// Default workflow HTTP client.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_client/user"
|
"code.tnxs.net/work/lib/api/auth/auth_client/user"
|
||||||
"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"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ import (
|
||||||
//
|
//
|
||||||
// When called, ChechAPIUser assumes there is an "auth" service account in the
|
// When called, ChechAPIUser assumes there is an "auth" service account in the
|
||||||
// app configuration file.
|
// app configuration file.
|
||||||
//
|
|
||||||
func CheckAPIUser(token *string) (*User, error) {
|
func CheckAPIUser(token *string) (*User, error) {
|
||||||
sugar.Debug("app.CheckAPIUser: 📥")
|
sugar.Debug("app.CheckAPIUser: 📥")
|
||||||
if authUser == nil {
|
if authUser == nil {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package app
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/app/logger"
|
"code.tnxs.net/work/lib/app/logger"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ package app
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/auth/auth_client"
|
"code.tnxs.net/work/lib/api/auth/auth_client"
|
||||||
"code.tnxs.net/vernonkeenan/lib/app/logger"
|
"code.tnxs.net/work/lib/app/logger"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/taxnexus/go-force/force"
|
"github.com/taxnexus/go-force/force"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -32,9 +32,9 @@ func InitConfig(systemName string, initalLogLevel zapcore.Level) {
|
||||||
sugar.Infof("app.InitConfig: 📥 %s", systemName)
|
sugar.Infof("app.InitConfig: 📥 %s", systemName)
|
||||||
appViper.SetConfigType("yaml")
|
appViper.SetConfigType("yaml")
|
||||||
appViper.SetConfigName(systemName)
|
appViper.SetConfigName(systemName)
|
||||||
appViper.AddConfigPath("/etc/vernonkeenan")
|
appViper.AddConfigPath("/etc/work")
|
||||||
appViper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
appViper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||||
appViper.SetEnvPrefix("vernonkeenan")
|
appViper.SetEnvPrefix("work")
|
||||||
appViper.AutomaticEnv() // read in environment variables that match
|
appViper.AutomaticEnv() // read in environment variables that match
|
||||||
err := appViper.ReadInConfig()
|
err := appViper.ReadInConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import "code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
|
||||||
|
|
||||||
// TenantUserActivityWrapper wraps the object with workflow params
|
// TenantUserActivityWrapper wraps the object with workflow params
|
||||||
type TenantUserActivityWrapper struct {
|
type TenantUserActivityWrapper struct {
|
||||||
Obj members_models.TenantUser
|
|
||||||
APIKey string
|
APIKey string
|
||||||
SagaID string
|
SagaID string
|
||||||
SagaType string
|
SagaType string
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
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"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
|
||||||
"github.com/go-openapi/runtime"
|
"github.com/go-openapi/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UserActivityWrapper wraps the object with workflow params
|
// UserActivityWrapper wraps the object with workflow params
|
||||||
type UserActivityWrapper struct {
|
type UserActivityWrapper struct {
|
||||||
Obj members_models.User
|
|
||||||
APIKey string
|
APIKey string
|
||||||
SagaID string
|
SagaID string
|
||||||
SagaType string
|
SagaType string
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package app
|
package app
|
||||||
|
|
||||||
import "code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
|
||||||
|
|
||||||
// UserRoleActivityWrapper wraps the object with workflow params
|
// UserRoleActivityWrapper wraps the object with workflow params
|
||||||
type UserRoleActivityWrapper struct {
|
type UserRoleActivityWrapper struct {
|
||||||
Obj members_models.UserRole
|
|
||||||
APIKey string
|
APIKey string
|
||||||
SagaID string
|
SagaID string
|
||||||
SagaType string
|
SagaType string
|
||||||
|
|
78
go.mod
78
go.mod
|
@ -1,32 +1,60 @@
|
||||||
module code.tnxs.net/vernonkeenan/lib
|
module code.tnxs.net/work/lib
|
||||||
|
|
||||||
go 1.15
|
go 1.21.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/go-openapi/errors v0.20.4
|
||||||
github.com/go-openapi/errors v0.20.3
|
github.com/go-openapi/runtime v0.26.0
|
||||||
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/strfmt v0.21.7
|
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-openapi/validate v0.22.1
|
||||||
github.com/go-sql-driver/mysql v1.7.0
|
github.com/go-sql-driver/mysql v1.7.1
|
||||||
github.com/golang/protobuf v1.5.3 // indirect
|
github.com/prometheus/client_golang v1.16.0
|
||||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
github.com/rs/cors v1.10.0
|
||||||
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
|
github.com/spf13/viper v1.16.0
|
||||||
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/taxnexus/go-force v1.0.7
|
github.com/taxnexus/go-force v1.0.7
|
||||||
go.opentelemetry.io/otel v1.14.0 // indirect
|
go.uber.org/zap v1.25.0
|
||||||
go.uber.org/atomic v1.10.0 // indirect
|
)
|
||||||
go.uber.org/multierr v1.10.0 // indirect
|
|
||||||
go.uber.org/zap v1.24.0
|
require (
|
||||||
golang.org/x/net v0.8.0 // indirect
|
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||||
google.golang.org/protobuf v1.30.0 // 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
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue