3
0

Rename files & symbols

This commit is contained in:
Denis Arh
2019-04-27 19:21:02 +02:00
parent d5c5c9ffae
commit 010a1351ea
137 changed files with 231 additions and 896 deletions

View File

@@ -15,7 +15,7 @@ steps:
# GOARCH: amd64
# commands:
# - go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/crust-$GOOS-$GOARCH cmd/crust/*.go
# - go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/crm-$GOOS-$GOARCH cmd/crm/*.go
# - go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/compose-$GOOS-$GOARCH cmd/compose/*.go
# - go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/messaging-$GOOS-$GOARCH cmd/messaging/*.go
# - go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/system-$GOOS-$GOARCH cmd/system/*.go
# - go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/system-cli-$GOOS-$GOARCH cmd/system-cli/*.go
@@ -32,12 +32,12 @@ steps:
from_secret: docker_hub_password
- name: api-crm
- name: api-compose
image: plugins/docker
settings:
repo: crusttech/api-crm
repo: crusttech/api-compose
auto_tag: true # generate tag names automatically based on git branch and git tag
dockerfile: Dockerfile.api-crm
dockerfile: Dockerfile.api-compose
username:
from_secret: docker_hub_username
password:
@@ -97,17 +97,17 @@ steps:
- make mocks
- make codegen
- go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/crust-$GOOS-$GOARCH cmd/crust/*.go
- go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/crm-$GOOS-$GOARCH cmd/crm/*.go
- go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/compose-$GOOS-$GOARCH cmd/compose/*.go
- go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/messaging-$GOOS-$GOARCH cmd/messaging/*.go
- go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/system-$GOOS-$GOARCH cmd/system/*.go
- go build -ldflags "-X github.com/crusttech/crust/internal/version.BuildTime=`date +%FT%T%z` -X github.com/crusttech/crust/internal/version.Version=`git describe --always --tags`" -o build/system-cli-$GOOS-$GOARCH cmd/system-cli/*.go
# check all tests are able to build
- wait-for-it.sh -t 60 --strict crust-db:3306 -- echo "Crust DB1 is up"
- gotest -v --tags="migrations" ./system/db/...
- gotest -v --tags="migrations" ./crm/db/...
- gotest -v --tags="migrations" ./compose/db/...
- gotest -v --tags="migrations" ./messaging/db/...
- go test -run=^$ --tags="unit integration external" ./cmd/... ./internal/... ./crm/... ./messaging/... ./system/...
- gotest -failfast --coverprofile=coverage.txt -v --tags="unit integration" ./internal/... ./system/... ./crm/... ./messaging/...
- go test -run=^$ --tags="unit integration external" ./cmd/... ./internal/... ./compose/... ./messaging/... ./system/...
- gotest -failfast --coverprofile=coverage.txt -v --tags="unit integration" ./internal/... ./system/... ./compose/... ./messaging/...
- name: coverage
image: plugins/codecov
settings:

View File

@@ -4,11 +4,11 @@ MESSAGING_HTTP_ERROR_TRACING=1
MESSAGING_DB_DSN=crust:crust@tcp(localhost:3306)/crust?collation=utf8mb4_general_ci
MESSAGING_DB_PROFILER=stdout
CRM_HTTP_ADDR=:3001
CRM_HTTP_PRETTY_JSON=1
CRM_HTTP_ERROR_TRACING=1
CRM_DB_DSN=crust:crust@tcp(localhost:3306)/crust?collation=utf8mb4_general_ci
CRM_DB_PROFILER=stdout
COMPOSE_HTTP_ADDR=:3001
COMPOSE_HTTP_PRETTY_JSON=1
COMPOSE_HTTP_ERROR_TRACING=1
COMPOSE_DB_DSN=crust:crust@tcp(localhost:3306)/crust?collation=utf8mb4_general_ci
COMPOSE_DB_PROFILER=stdout
SYSTEM_HTTP_ADDR=:3002
SYSTEM_HTTP_PRETTY_JSON=1

View File

@@ -66,8 +66,8 @@ schema:
- ../../.git
# ######################################################################################################################
- name: crm
path: cmd/crm
- name: cmp
path: cmd/compose
commands:
vet:
status: false
@@ -80,7 +80,7 @@ schema:
watcher:
paths:
- .
- ../../crm
- ../../compose
- ../../internal
extensions:
- go

View File

@@ -8,7 +8,7 @@ COPY . .
RUN mkdir /build; \
go build \
-ldflags "-X github.com/crusttech/crust/internal/version.BuildTime="`date +%FT%T%z`" -X github.com/crusttech/crust/internal/version.Version="`git describe --always --tags` \
-o /build/crm cmd/crm/*.go
-o /build/compose cmd/compose/*.go
## == target image ==
@@ -23,4 +23,4 @@ WORKDIR /crust
EXPOSE 80
ENTRYPOINT /crust/crm
ENTRYPOINT /crust/compose

View File

@@ -1,12 +1,12 @@
.PHONY: help docker docker-push realize dep dep.update test test.messaging test.crm qa critic vet codegen integration
.PHONY: help docker docker-push realize dep dep.update test test.messaging test.compose qa critic vet codegen integration
PKG = "github.com/$(shell cat .project)"
GO = go
GOGET = $(GO) get -u
BASEPKGS = system crm messaging
IMAGES = system crm messaging
BASEPKGS = system compose messaging
IMAGES = system compose messaging
########################################################################################################################
# Tool bins
@@ -25,7 +25,7 @@ help:
@echo
@echo - vet - run go vet on all code
@echo - critic - run go critic on all code
@echo - test.crm - individual package unit tests
@echo - test.compose - individual package unit tests
@echo - test.messaging - individual package unit tests
@echo - test - run all available unit tests
@echo - qa - run vet, critic and test on code
@@ -86,13 +86,13 @@ test.events: $(GOTEST)
perl -pi -e 's/command-line-arguments/.\/messaging\/repository/g' .cover.out
$(GO) tool cover -func=.cover.out | grep --color "^\|[^0-9]0.0%"
test.crm: $(GOTEST)
$(GOTEST) -covermode count -coverprofile .cover.out -v ./crm/service/...
test.compose: $(GOTEST)
$(GOTEST) -covermode count -coverprofile .cover.out -v ./compose/service/...
$(GO) tool cover -func=.cover.out | grep --color "^\|[^0-9]0.0%"
test.crm.db: $(GOTEST)
cd crm/db && $(GO) generate && cd ../..
$(GOTEST) -covermode count -coverprofile .cover.out -v ./crm/db/...
test.compose.db: $(GOTEST)
cd compose/db && $(GO) generate && cd ../..
$(GOTEST) -covermode count -coverprofile .cover.out -v ./compose/db/...
$(GO) tool cover -func=.cover.out | grep --color "^\|[^0-9]0.0%"
test.system: $(GOTEST)

View File

@@ -9,7 +9,7 @@ Crust brings your user ecosystem and essential applications together on one plat
**Crust CRM** is the highly flexible, scalable and open source Salesforce alternative, that enables you to sell faster and interact with leads, clients and team members easier then ever before. Seamless integration with Crust Messaging and Crust Identity and Access Management make it the most complete and flexible self-hosted CRM platform on the market.
**Crust Unify** manages user experience for Crust applications, such as CRM and Messaging, as well as providing an integrated interface for third party or other bespoke applications. 100% responsive and with an intuitive design, Crust Unify increases productivity and ease of access to all IT resources.
**Crust Unify** manages user experience for Crust applications, such as Compose and Messaging, as well as providing an integrated interface for third party or other bespoke applications. 100% responsive and with an intuitive design, Crust Unify increases productivity and ease of access to all IT resources.
## Contributing
@@ -18,9 +18,7 @@ Crust brings your user ecosystem and essential applications together on one plat
Copy `.env.example` to `.env` and make proper modifications for your local environment.
An access to a (local) instance of MySQL must be available.
Configure access to your database with `SAM_DB_DSN` and `CRM_DB_DSN`.
Please check the options available with `./app -h`.
Configure access to your database with `SYSTEM_DB_DSN`, `MESSAGING_DB_DSN` and `COMPOSE_DB_DSN`.
The database will be populated with migrations at the start of each service. You don't need to pre-populate the database, just make sure that your permissions include CREATE and ALTER capabilities.

View File

@@ -26,7 +26,7 @@
},
{
"title": "Pages",
"description": "CRM module pages",
"description": "Compose module pages",
"entrypoint": "page",
"path": "/page",
"authentication": [],
@@ -245,7 +245,7 @@
},
{
"title": "Modules",
"description": "CRM module definitions",
"description": "Compose module definitions",
"entrypoint": "module",
"path": "/module",
"authentication": [],
@@ -253,7 +253,7 @@
{
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types",
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
]
}
],
@@ -374,14 +374,14 @@
},
{
"title": "Records",
"description": "CRM records ",
"description": "Compose records ",
"entrypoint": "record",
"path": "/module/{moduleID}/record",
"authentication": [],
"struct": [
{
"imports": [
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
]
}
],
@@ -669,7 +669,7 @@
},
{
"title": "Triggers",
"description": "CRM Triggers",
"description": "Compose Triggers",
"entrypoint": "trigger",
"path": "/trigger",
"authentication": [],
@@ -814,7 +814,7 @@
},
{
"title": "Notifications",
"description": "CRM Notifications",
"description": "Compose Notifications",
"entrypoint": "notification",
"path": "/notification",
"authentication": [],
@@ -829,7 +829,7 @@
{
"name": "email/send",
"method": "POST",
"title": "Send email from the CRM",
"title": "Send email from the Compose",
"path": "/email",
"parameters": {
"post": [

View File

@@ -1,12 +1,12 @@
{
"Title": "Modules",
"Description": "CRM module definitions",
"Description": "Compose module definitions",
"Interface": "Module",
"Struct": [
{
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types",
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
]
}
],

View File

@@ -1,6 +1,6 @@
{
"Title": "Notifications",
"Description": "CRM Notifications",
"Description": "Compose Notifications",
"Interface": "Notification",
"Struct": [
{
@@ -17,7 +17,7 @@
{
"Name": "email/send",
"Method": "POST",
"Title": "Send email from the CRM",
"Title": "Send email from the Compose",
"Path": "/email",
"Parameters": {
"post": [

View File

@@ -1,6 +1,6 @@
{
"Title": "Pages",
"Description": "CRM module pages",
"Description": "Compose module pages",
"Interface": "Page",
"Struct": [
{

View File

@@ -1,11 +1,11 @@
{
"Title": "Records",
"Description": "CRM records ",
"Description": "Compose records",
"Interface": "Record",
"Struct": [
{
"imports": [
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
]
}
],

View File

@@ -1,6 +1,6 @@
{
"Title": "Triggers",
"Description": "CRM Triggers",
"Description": "Compose Triggers",
"Interface": "Trigger",
"Struct": null,
"Parameters": null,

View File

@@ -12,7 +12,7 @@ import (
"github.com/crusttech/crust/internal/subscription"
"github.com/crusttech/crust/internal/version"
crm "github.com/crusttech/crust/crm"
compose "github.com/crusttech/crust/compose"
system "github.com/crusttech/crust/system"
)
@@ -24,7 +24,7 @@ func main() {
ctx := context.AsContext(sigctx.New())
crm.Flags("crm")
compose.Flags("compose")
system.Flags("system")
subscription.Flags()
@@ -34,7 +34,7 @@ func main() {
if err := system.Init(ctx); err != nil {
log.Fatalf("Error initializing: %+v", err)
}
if err := crm.Init(ctx); err != nil {
if err := compose.Init(ctx); err != nil {
log.Fatalf("Error initializing: %+v", err)
}
@@ -51,7 +51,7 @@ func main() {
// Disabled for now, system service is the only one that validates subscription
// ctx = subscription.Monitor(ctx)
if err := crm.StartRestAPI(ctx); err != nil {
if err := compose.StartRestAPI(ctx); err != nil {
log.Fatalf("Error starting/running: %+v", err)
}
}

View File

@@ -13,7 +13,7 @@ import (
_ "github.com/joho/godotenv/autoload"
"github.com/namsral/flag"
crm "github.com/crusttech/crust/crm"
compose "github.com/crusttech/crust/compose"
"github.com/crusttech/crust/internal/auth"
messaging "github.com/crusttech/crust/messaging"
system "github.com/crusttech/crust/system"
@@ -55,7 +55,7 @@ func main() {
flags.http = new(config.HTTP).Init()
flags.monitor = new(config.Monitor).Init()
crm.Flags("crm")
compose.Flags("compose")
messaging.Flags("messaging")
system.Flags("system")
@@ -78,8 +78,8 @@ func main() {
if err := system.Init(ctx); err != nil {
log.Fatalf("Error initializing system: %+v", err)
}
if err := crm.Init(ctx); err != nil {
log.Fatalf("Error initializing crm: %+v", err)
if err := compose.Init(ctx); err != nil {
log.Fatalf("Error initializing compose: %+v", err)
}
if err := messaging.Init(ctx); err != nil {
log.Fatalf("Error initializing messaging: %+v", err)
@@ -103,16 +103,16 @@ func main() {
// logging, cors and such
middleware.Mount(ctx, r, flags.http)
// Use JWT secret for hmac signer for now
auth.DefaultSigner = auth.HmacSigner(authJwtFlags.Secret)
auth.DefaultJwtHandler, err = auth.JWT(authJwtFlags.Secret, authJwtFlags.Expiry)
// Use JWT secret for hmac signer for now
auth.DefaultSigner = auth.HmacSigner(authJwtFlags.Secret)
auth.DefaultJwtHandler, err = auth.JWT(authJwtFlags.Secret, authJwtFlags.Expiry)
if err != nil {
log.Fatalf("Error creating JWT Auth: %v", err)
}
r.Route("/api", func(r chi.Router) {
r.Route("/crm", func(r chi.Router) {
crm.MountRoutes(ctx, r)
r.Route("/compose", func(r chi.Router) {
compose.MountRoutes(ctx, r)
})
r.Route("/messaging", func(r chi.Router) {
messaging.MountRoutes(ctx, r)
@@ -125,8 +125,8 @@ func main() {
fileserver := http.FileServer(http.Dir("webapp"))
for _, service := range []string{"admin", "system", "messaging", "crm"} {
r.HandleFunc("/"+service+"*", serveIndex("webapp", "crm/index.html", fileserver))
for _, service := range []string{"admin", "system", "messaging", "compose"} {
r.HandleFunc("/"+service+"*", serveIndex("webapp", "compose/index.html", fileserver))
}
r.HandleFunc("/*", serveIndex("webapp", "index.html", fileserver))

View File

@@ -22,15 +22,15 @@ function types {
CGO_ENABLED=0 go build -o ./build/gen-type-set codegen/v2/type-set.go
fi
./build/gen-type-set --types Attachment --output crm/types/attachment.gen.go
./build/gen-type-set --types Module --output crm/types/module.gen.go
./build/gen-type-set --types Page --output crm/types/page.gen.go
./build/gen-type-set --types Chart --output crm/types/chart.gen.go
./build/gen-type-set --types Trigger --output crm/types/trigger.gen.go
./build/gen-type-set --types Record --output crm/types/record.gen.go
./build/gen-type-set --types Attachment --output compose/types/attachment.gen.go
./build/gen-type-set --types Module --output compose/types/module.gen.go
./build/gen-type-set --types Page --output compose/types/page.gen.go
./build/gen-type-set --types Chart --output compose/types/chart.gen.go
./build/gen-type-set --types Trigger --output compose/types/trigger.gen.go
./build/gen-type-set --types Record --output compose/types/record.gen.go
./build/gen-type-set --with-primary-key=false --types ModuleField --output crm/types/module_field.gen.go
./build/gen-type-set --with-primary-key=false --types RecordValue --output crm/types/record_value.gen.go
./build/gen-type-set --with-primary-key=false --types ModuleField --output compose/types/module_field.gen.go
./build/gen-type-set --with-primary-key=false --types RecordValue --output compose/types/record_value.gen.go
./build/gen-type-set --types MessageAttachment --output messaging/types/attachment.gen.go
./build/gen-type-set --types Mention --output messaging/types/mention.gen.go

View File

@@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/db/mysql"
"github.com/crusttech/crust/compose/db/mysql"
)
func statements(contents []byte, err error) ([]string, error) {

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,32 @@
DROP TABLE IF EXISTS crm_field;
DROP TABLE IF EXISTS crm_fields;
DROP TABLE IF EXISTS crm_content_links;
DROP TABLE IF EXISTS crm_content_column;
DROP TABLE IF EXISTS crm_module_content;
ALTER TABLE crm_attachment
RENAME TO compose_attachment;
ALTER TABLE crm_chart
RENAME TO compose_chart;
ALTER TABLE crm_content
RENAME TO compose_content;
ALTER TABLE crm_module
RENAME TO compose_module;
ALTER TABLE crm_module_form
RENAME TO compose_module_form;
ALTER TABLE crm_page
RENAME TO compose_page;
ALTER TABLE crm_record
RENAME TO compose_record;
ALTER TABLE crm_record_value
RENAME TO compose_record_value;
ALTER TABLE crm_trigger
RENAME TO compose_trigger;

View File

@@ -3,7 +3,7 @@ package service
import (
"github.com/pkg/errors"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/internal/config"
)

View File

@@ -9,7 +9,7 @@ import (
"github.com/titpetric/factory"
sq "gopkg.in/Masterminds/squirrel.v1"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -39,10 +39,10 @@ const (
sqlAttachmentScope = "deleted_at IS NULL"
sqlAttachmentByID = `SELECT ` + sqlAttachmentColumns +
` FROM crm_attachment AS a WHERE id = ? AND ` + sqlAttachmentScope
` FROM compose_attachment AS a WHERE id = ? AND ` + sqlAttachmentScope
sqlAttachmentsByIDs = `SELECT ` + sqlAttachmentColumns +
` FROM crm_attachment AS a WHERE id IN (?) AND ` + sqlAttachmentScope
` FROM compose_attachment AS a WHERE id IN (?) AND ` + sqlAttachmentScope
)
func Attachment(ctx context.Context, db *factory.DB) AttachmentRepository {
@@ -85,7 +85,7 @@ func (r *attachment) Find(filter types.AttachmentFilter) (set types.AttachmentSe
set = types.AttachmentSet{}
query := sq.Select().From("crm_attachment AS a").Where(sq.Eq{"a.kind": f.Kind})
query := sq.Select().From("compose_attachment AS a").Where(sq.Eq{"a.kind": f.Kind})
switch f.Kind {
case types.PageAttachment:
@@ -96,11 +96,11 @@ func (r *attachment) Find(filter types.AttachmentFilter) (set types.AttachmentSe
}
case types.RecordAttachment:
query = query.
Join("crm_record_value AS v ON (v.ref = a.id)")
Join("compose_record_value AS v ON (v.ref = a.id)")
if f.ModuleID > 0 {
query = query.
Join("crm_record AS r ON (r.id = v.record_id)").
Join("compose_record AS r ON (r.id = v.record_id)").
Where(sq.Eq{"r.module_id": f.ModuleID})
}
@@ -156,10 +156,10 @@ func (r *attachment) Create(mod *types.Attachment) (*types.Attachment, error) {
mod.CreatedAt = time.Now()
return mod, r.db().Insert("crm_attachment", mod)
return mod, r.db().Insert("compose_attachment", mod)
}
func (r *attachment) DeleteByID(id uint64) error {
_, err := r.db().Exec("UPDATE crm_attachment SET deleted_at = NOW() WHERE id = ?", id)
_, err := r.db().Exec("UPDATE compose_attachment SET deleted_at = NOW() WHERE id = ?", id)
return err
}

View File

@@ -6,7 +6,7 @@ import (
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -28,7 +28,7 @@ type (
const sqlChartColumns = "id, name, config, " +
"created_at, updated_at, deleted_at"
const sqlChartSelect = "SELECT " + sqlChartColumns + " FROM crm_chart"
const sqlChartSelect = "SELECT " + sqlChartColumns + " FROM compose_chart"
func Chart(ctx context.Context, db *factory.DB) ChartRepository {
return (&chart{}).With(ctx, db)
@@ -57,16 +57,16 @@ func (r *chart) Create(mod *types.Chart) (*types.Chart, error) {
mod.ID = factory.Sonyflake.NextID()
mod.CreatedAt = time.Now()
return mod, r.db().Insert("crm_chart", mod)
return mod, r.db().Insert("compose_chart", mod)
}
func (r *chart) Update(mod *types.Chart) (*types.Chart, error) {
now := time.Now()
mod.UpdatedAt = &now
return mod, r.db().Replace("crm_chart", mod)
return mod, r.db().Replace("compose_chart", mod)
}
func (r *chart) DeleteByID(id uint64) error {
_, err := r.db().Exec("DELETE FROM crm_chart WHERE id = ?", id)
_, err := r.db().Exec("DELETE FROM compose_chart WHERE id = ?", id)
return err
}

View File

@@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -33,7 +33,7 @@ const (
created_at, updated_at, deleted_at
`
sqlModuleSelect = `
SELECT ` + sqlModuleColumns + ` FROM crm_module WHERE deleted_at IS NULL
SELECT ` + sqlModuleColumns + ` FROM compose_module WHERE deleted_at IS NULL
`
)
@@ -89,7 +89,7 @@ func (r *module) Create(mod *types.Module) (*types.Module, error) {
return nil, err
}
return mod, r.db().Insert("crm_module", mod)
return mod, r.db().Insert("compose_module", mod)
}
func (r *module) Update(mod *types.Module) (*types.Module, error) {
@@ -100,19 +100,19 @@ func (r *module) Update(mod *types.Module) (*types.Module, error) {
return nil, err
}
return mod, r.db().Replace("crm_module", mod)
return mod, r.db().Replace("compose_module", mod)
}
func (r *module) updateFields(moduleID uint64, ff types.ModuleFieldSet) error {
// @todo be more selective when deleting
if _, err := r.db().Exec("DELETE FROM crm_module_form WHERE module_id = ?", moduleID); err != nil {
if _, err := r.db().Exec("DELETE FROM compose_module_form WHERE module_id = ?", moduleID); err != nil {
return errors.Wrap(err, "Error updating module fields")
}
for idx, v := range ff {
v.ModuleID = moduleID
v.Place = idx
if err := r.db().Replace("crm_module_form", v); err != nil {
if err := r.db().Replace("compose_module_form", v); err != nil {
return errors.Wrap(err, "Error updating module fields")
}
}
@@ -121,7 +121,7 @@ func (r *module) updateFields(moduleID uint64, ff types.ModuleFieldSet) error {
}
func (r *module) DeleteByID(id uint64) error {
_, err := r.db().Exec("DELETE FROM crm_module WHERE id=?", id)
_, err := r.db().Exec("DELETE FROM compose_module WHERE id=?", id)
return err
}
@@ -130,7 +130,7 @@ func (r *module) fields(IDs ...uint64) (ff types.ModuleFieldSet, err error) {
return
}
if sql, args, err := sqlx.In("SELECT * FROM crm_module_form WHERE module_id IN (?) ORDER BY module_id AND place", IDs); err != nil {
if sql, args, err := sqlx.In("SELECT * FROM compose_module_form WHERE module_id IN (?) ORDER BY module_id AND place", IDs); err != nil {
return nil, err
} else {
return ff, r.db().Select(&ff, sql, args...)

View File

@@ -5,7 +5,7 @@ import (
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -42,7 +42,7 @@ func (r *page) With(ctx context.Context, db *factory.DB) PageRepository {
func (r *page) FindByID(id uint64) (*types.Page, error) {
page := &types.Page{}
if err := r.db().Get(page, "SELECT * FROM crm_page WHERE id=?", id); err != nil {
if err := r.db().Get(page, "SELECT * FROM compose_page WHERE id=?", id); err != nil {
return page, err
}
return page, nil
@@ -50,26 +50,26 @@ func (r *page) FindByID(id uint64) (*types.Page, error) {
func (r *page) FindByModuleID(id uint64) (*types.Page, error) {
page := &types.Page{}
if err := r.db().Get(page, "SELECT * FROM crm_page WHERE module_id=?", id); err != nil {
if err := r.db().Get(page, "SELECT * FROM compose_page WHERE module_id=?", id); err != nil {
return nil, err
}
return page, nil
}
func (r *page) FindRecordPages() (set types.PageSet, err error) {
return set, r.db().Select(&set, "SELECT * FROM crm_page WHERE module_id > 0")
return set, r.db().Select(&set, "SELECT * FROM compose_page WHERE module_id > 0")
}
func (r *page) FindBySelfID(selfID uint64) (types.PageSet, error) {
pages := types.PageSet{}
if err := r.db().Select(&pages, "SELECT * FROM crm_page WHERE self_id = ? ORDER BY weight ASC", selfID); err != nil {
if err := r.db().Select(&pages, "SELECT * FROM compose_page WHERE self_id = ? ORDER BY weight ASC", selfID); err != nil {
return pages, err
}
return pages, nil
}
func (r *page) Find() (set types.PageSet, err error) {
return set, r.db().Select(&set, "SELECT * FROM crm_page ORDER BY self_id, weight ASC")
return set, r.db().Select(&set, "SELECT * FROM compose_page ORDER BY self_id, weight ASC")
}
func (r *page) Reorder(selfID uint64, pageIDs []uint64) error {
@@ -87,7 +87,7 @@ func (r *page) Reorder(selfID uint64, pageIDs []uint64) error {
for _, pageID := range pageIDs {
if pageMap[pageID] {
pageMap[pageID] = false
if _, err := db.Exec("UPDATE crm_page set weight=? where id=? and self_id=?", weight, pageID, selfID); err != nil {
if _, err := db.Exec("UPDATE compose_page set weight=? where id=? and self_id=?", weight, pageID, selfID); err != nil {
return err
}
weight++
@@ -95,7 +95,7 @@ func (r *page) Reorder(selfID uint64, pageIDs []uint64) error {
}
for pageID, update := range pageMap {
if update {
if _, err := db.Exec("UPDATE crm_page set weight=? where id=? and self_id=?", weight, pageID, selfID); err != nil {
if _, err := db.Exec("UPDATE compose_page set weight=? where id=? and self_id=?", weight, pageID, selfID); err != nil {
return err
}
weight++
@@ -109,14 +109,14 @@ func (r *page) Create(item *types.Page) (*types.Page, error) {
*page = *item
page.ID = factory.Sonyflake.NextID()
return page, r.db().Insert("crm_page", page)
return page, r.db().Insert("compose_page", page)
}
func (r *page) Update(page *types.Page) (*types.Page, error) {
return page, r.db().Replace("crm_page", page)
return page, r.db().Replace("compose_page", page)
}
func (r *page) DeleteByID(id uint64) error {
_, err := r.db().Exec("DELETE FROM crm_page WHERE id=?", id)
_, err := r.db().Exec("DELETE FROM compose_page WHERE id=?", id)
return err
}

View File

@@ -11,9 +11,9 @@ import (
"github.com/titpetric/factory"
sq "gopkg.in/Masterminds/squirrel.v1"
"github.com/crusttech/crust/crm/internal/repository/ql"
"github.com/crusttech/crust/compose/internal/repository/ql"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -76,7 +76,7 @@ func (r *record) With(ctx context.Context, db *factory.DB) RecordRepository {
func (r *record) FindByID(id uint64) (*types.Record, error) {
mod := &types.Record{}
if err := r.db().Get(mod, "SELECT * FROM crm_record WHERE id=? and deleted_at IS NULL", id); err != nil {
if err := r.db().Get(mod, "SELECT * FROM compose_record WHERE id=? and deleted_at IS NULL", id); err != nil {
return nil, err
}
return mod, nil
@@ -167,7 +167,7 @@ func (r *record) Find(module *types.Module, filter string, sort string, page int
func (r *record) buildQuery(module *types.Module, filter string, sort string) (query sq.SelectBuilder, err error) {
// Create query for fetching and counting records.
query = sq.Select().
From("crm_record AS r").
From("compose_record AS r").
Where(sq.Eq{"r.module_id": module.ID}).
Where(sq.Eq{"r.deleted_at": nil})
@@ -206,7 +206,7 @@ func (r *record) buildQuery(module *types.Module, filter string, sort string) (q
if !alreadyJoined(i.Value) {
query = query.LeftJoin(fmt.Sprintf(
"crm_record_value AS rv_%s ON (rv_%s.record_id = r.id AND rv_%s.name = ? AND rv_%s.deleted_at IS NULL)",
"compose_record_value AS rv_%s ON (rv_%s.record_id = r.id AND rv_%s.name = ? AND rv_%s.deleted_at IS NULL)",
i.Value, i.Value, i.Value, i.Value,
), i.Value)
}
@@ -248,7 +248,7 @@ func (r *record) buildQuery(module *types.Module, filter string, sort string) (q
if !alreadyJoined(i.Value) {
query = query.LeftJoin(fmt.Sprintf(
"crm_record_value AS rv_%s ON (rv_%s.record_id = r.id AND rv_%s.name = ? AND rv_%s.deleted_at IS NULL)",
"compose_record_value AS rv_%s ON (rv_%s.record_id = r.id AND rv_%s.name = ? AND rv_%s.deleted_at IS NULL)",
i.Value, i.Value, i.Value, i.Value,
), i.Value)
}
@@ -273,7 +273,7 @@ func (r *record) buildQuery(module *types.Module, filter string, sort string) (q
func (r *record) Create(record *types.Record) (*types.Record, error) {
record.ID = factory.Sonyflake.NextID()
if err := r.db().Replace("crm_record", record); err != nil {
if err := r.db().Replace("compose_record", record); err != nil {
return nil, errors.Wrap(err, "could not update record")
}
@@ -281,7 +281,7 @@ func (r *record) Create(record *types.Record) (*types.Record, error) {
}
func (r *record) Update(record *types.Record) (*types.Record, error) {
if err := r.db().Replace("crm_record", record); err != nil {
if err := r.db().Replace("compose_record", record); err != nil {
return nil, errors.Wrap(err, "could not update record")
}
@@ -290,7 +290,7 @@ func (r *record) Update(record *types.Record) (*types.Record, error) {
func (r *record) Delete(record *types.Record) error {
_, err := r.db().Exec(
"UPDATE crm_record SET deleted_at = ?, deleted_by = ? WHERE id = ?",
"UPDATE compose_record SET deleted_at = ?, deleted_by = ? WHERE id = ?",
record.DeletedAt,
record.DeletedBy,
record.ID,
@@ -301,7 +301,7 @@ func (r *record) Delete(record *types.Record) error {
func (r *record) DeleteValues(record *types.Record) error {
_, err := r.db().Exec(
"UPDATE crm_record_value SET deleted_at = ? WHERE record_id = ?",
"UPDATE compose_record_value SET deleted_at = ? WHERE record_id = ?",
record.DeletedAt,
record.ID)
@@ -311,13 +311,13 @@ func (r *record) DeleteValues(record *types.Record) error {
func (r *record) UpdateValues(recordID uint64, rvs types.RecordValueSet) (err error) {
// Remove all records and prepare to be updated
// @todo be more selective and delete only removed values
if _, err = r.db().Exec("DELETE FROM crm_record_value WHERE record_id = ?", recordID); err != nil {
if _, err = r.db().Exec("DELETE FROM compose_record_value WHERE record_id = ?", recordID); err != nil {
return errors.Wrap(err, "could not remove record values")
}
err = rvs.Walk(func(value *types.RecordValue) error {
value.RecordID = recordID
return r.db().Replace("crm_record_value", value)
return r.db().Replace("compose_record_value", value)
})
return errors.Wrap(err, "could not replace record values")
@@ -329,7 +329,7 @@ func (r *record) LoadValues(IDs ...uint64) (rvs types.RecordValueSet, err error)
return
}
var sql = "SELECT * FROM crm_record_value WHERE record_id IN (?) AND deleted_at IS NULL ORDER BY record_id, place"
var sql = "SELECT * FROM compose_record_value WHERE record_id IN (?) AND deleted_at IS NULL ORDER BY record_id, place"
if sql, args, err := sqlx.In(sql, IDs); err != nil {
return nil, err
@@ -370,18 +370,18 @@ func isRealRecordCol(name string) (string, bool) {
func (r *record) CountAuthored(userID uint64) (c int, err error) {
return c, r.db().Get(&c,
"SELECT COUNT(*) FROM crm_record WHERE created_by = ? OR updated_by = ? OR deleted_by = ?",
"SELECT COUNT(*) FROM compose_record WHERE created_by = ? OR updated_by = ? OR deleted_by = ?",
userID, userID, userID)
}
func (r *record) ChangeAuthor(userID, target uint64) error {
if _, err := r.db().Exec("UPDATE crm_record SET created_by = ? WHERE created_by = ?", target, userID); err != nil {
if _, err := r.db().Exec("UPDATE compose_record SET created_by = ? WHERE created_by = ?", target, userID); err != nil {
return err
}
if _, err := r.db().Exec("UPDATE crm_record SET updated_by = ? WHERE updated_by = ?", target, userID); err != nil {
if _, err := r.db().Exec("UPDATE compose_record SET updated_by = ? WHERE updated_by = ?", target, userID); err != nil {
return err
}
if _, err := r.db().Exec("UPDATE crm_record SET deleted_by = ? WHERE deleted_by = ?", target, userID); err != nil {
if _, err := r.db().Exec("UPDATE compose_record SET deleted_by = ? WHERE deleted_by = ?", target, userID); err != nil {
return err
}
@@ -391,11 +391,11 @@ func (r *record) ChangeAuthor(userID, target uint64) error {
func (r *record) CountReferenced(userID uint64) (c int, err error) {
// @todo add field type (User) check
return c, r.db().Get(&c,
"SELECT COUNT(*) FROM crm_record_value WHERE ref = ?",
"SELECT COUNT(*) FROM compose_record_value WHERE ref = ?",
userID)
}
func (r *record) ChangeReferences(userID, target uint64) error {
_, err := r.db().Exec("UPDATE crm_record_value SET ref = ? WHERE ref = ?", target, userID)
_, err := r.db().Exec("UPDATE compose_record_value SET ref = ? WHERE ref = ?", target, userID)
return err
}

View File

@@ -9,8 +9,8 @@ import (
"github.com/pkg/errors"
"gopkg.in/Masterminds/squirrel.v1"
"github.com/crusttech/crust/crm/internal/repository/ql"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository/ql"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -53,7 +53,7 @@ func NewRecordReportBuilder(module *types.Module) *recordReportBuilder {
var report = squirrel.
Select().
Column(squirrel.Alias(squirrel.Expr("COUNT(*)"), "count")).
From("crm_record").
From("compose_record").
Where("module_id = ?", module.ID)
return &recordReportBuilder{
@@ -88,7 +88,7 @@ func (b *recordReportBuilder) Build(metrics, dimensions, filters string) (sql st
if !alreadyJoined(i.Value) {
b.report = b.report.LeftJoin(fmt.Sprintf(
"crm_record_value AS rv_%s ON (rv_%s.record_id = crm_record.id AND rv_%s.name = ? AND rv_%s.deleted_at IS NULL)",
"compose_record_value AS rv_%s ON (rv_%s.record_id = compose_record.id AND rv_%s.name = ? AND rv_%s.deleted_at IS NULL)",
i.Value, i.Value, i.Value, i.Value,
), i.Value)
}

View File

@@ -5,7 +5,7 @@ package repository
import (
"testing"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/test"
)
@@ -22,9 +22,9 @@ func TestRecordReportBuilder2(t *testing.T) {
expected := "SELECT (COUNT(*)) AS count, (CAST(max(rv_single1.value) AS DECIMAL(14,2))) AS metric_0, " +
"(QUARTER(rv_ref1.value)) AS dimension_0 " +
"FROM crm_record " +
"LEFT JOIN crm_record_value AS rv_single1 ON (rv_single1.record_id = crm_record.id AND rv_single1.name = ? AND rv_single1.deleted_at IS NULL) " +
"LEFT JOIN crm_record_value AS rv_ref1 ON (rv_ref1.record_id = crm_record.id AND rv_ref1.name = ? AND rv_ref1.deleted_at IS NULL) " +
"FROM compose_record " +
"LEFT JOIN compose_record_value AS rv_single1 ON (rv_single1.record_id = compose_record.id AND rv_single1.name = ? AND rv_single1.deleted_at IS NULL) " +
"LEFT JOIN compose_record_value AS rv_ref1 ON (rv_ref1.record_id = compose_record.id AND rv_ref1.name = ? AND rv_ref1.deleted_at IS NULL) " +
"WHERE module_id = ? AND rv_ref1.value = 2 " +
"GROUP BY dimension_0 " +
"ORDER BY dimension_0"

View File

@@ -8,7 +8,7 @@ import (
"strings"
"testing"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/test"
)

View File

@@ -17,7 +17,7 @@ type (
// DB produces a contextual DB handle
func DB(ctx context.Context) *factory.DB {
return factory.Database.MustGet("crm").With(ctx)
return factory.Database.MustGet("compose").With(ctx)
}
// Identity returns the User ID from context

View File

@@ -7,7 +7,7 @@ import (
"github.com/titpetric/factory"
"gopkg.in/Masterminds/squirrel.v1"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
)
type (
@@ -66,7 +66,7 @@ func (r trigger) query() (query squirrel.SelectBuilder) {
Columns(
"id", "name", "actions", "enabled", "source", "rel_module",
"created_at", "updated_at", "deleted_at").
From("crm_trigger").
From("compose_trigger").
OrderBy("id DESC")
return
@@ -76,16 +76,16 @@ func (r *trigger) Create(mod *types.Trigger) (*types.Trigger, error) {
mod.ID = factory.Sonyflake.NextID()
mod.CreatedAt = time.Now()
return mod, r.db().Insert("crm_trigger", mod)
return mod, r.db().Insert("compose_trigger", mod)
}
func (r *trigger) Update(mod *types.Trigger) (*types.Trigger, error) {
now := time.Now()
mod.UpdatedAt = &now
return mod, r.db().Replace("crm_trigger", mod)
return mod, r.db().Replace("compose_trigger", mod)
}
func (r *trigger) DeleteByID(id uint64) error {
_, err := r.db().Exec("DELETE FROM crm_trigger WHERE id = ?", id)
_, err := r.db().Exec("DELETE FROM compose_trigger WHERE id = ?", id)
return err
}

View File

@@ -16,8 +16,8 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/crusttech/crust/internal/store"

View File

@@ -6,8 +6,8 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
)
type (

View File

@@ -10,7 +10,7 @@ import (
"github.com/namsral/flag"
"github.com/titpetric/factory"
crmMigrate "github.com/crusttech/crust/crm/db"
composeMigrate "github.com/crusttech/crust/compose/db"
systemMigrate "github.com/crusttech/crust/system/db"
systemService "github.com/crusttech/crust/system/service"
)
@@ -25,7 +25,7 @@ func TestMain(m *testing.M) {
flag.Parse()
factory.Database.Add("default", dsn)
factory.Database.Add("crm", dsn)
factory.Database.Add("compose", dsn)
factory.Database.Add("system", dsn)
db := factory.Database.MustGet()
@@ -36,14 +36,14 @@ func TestMain(m *testing.M) {
log.Printf("Error running migrations: %+v\n", err)
return
}
if err := crmMigrate.Migrate(db); err != nil {
if err := composeMigrate.Migrate(db); err != nil {
log.Printf("Error running migrations: %+v\n", err)
return
}
// clean up tables
{
for _, name := range []string{"crm_chart", "crm_trigger", "crm_module", "crm_module_form", "crm_record", "crm_record_value", "crm_page", "sys_user"} {
for _, name := range []string{"compose_chart", "compose_trigger", "compose_module", "compose_module_form", "compose_record", "compose_record_value", "compose_page", "sys_user"} {
_, err := db.Exec("truncate " + name)
if err != nil {
panic("Error when clearing " + name + ": " + err.Error())

View File

@@ -6,8 +6,8 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
)
type (

View File

@@ -6,7 +6,7 @@ import (
"context"
"testing"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/crusttech/crust/internal/test"
systemTypes "github.com/crusttech/crust/system/types"

View File

@@ -6,8 +6,8 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
)
type (

View File

@@ -9,7 +9,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/pkg/errors"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/crusttech/crust/internal/test"
systemTypes "github.com/crusttech/crust/system/types"

View File

@@ -3,8 +3,8 @@ package service
import (
"context"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
internalRules "github.com/crusttech/crust/internal/rules"
systemService "github.com/crusttech/crust/system/service"
)

View File

@@ -6,8 +6,8 @@ import (
"context"
"testing"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/crusttech/crust/internal/rules"
. "github.com/crusttech/crust/internal/test"

View File

@@ -8,8 +8,8 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
systemService "github.com/crusttech/crust/system/service"

View File

@@ -6,7 +6,7 @@ import (
"context"
"testing"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/crusttech/crust/internal/test"
systemService "github.com/crusttech/crust/system/service"

View File

@@ -6,8 +6,8 @@ import (
"github.com/pkg/errors"
"github.com/titpetric/factory"
"github.com/crusttech/crust/crm/internal/repository"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/repository"
"github.com/crusttech/crust/compose/types"
)
type (

View File

@@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/crusttech/crust/internal/test"
systemTypes "github.com/crusttech/crust/system/types"

View File

@@ -8,9 +8,9 @@ import (
"net/url"
"time"
"github.com/crusttech/crust/crm/internal/service"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/service"
"github.com/crusttech/crust/compose/rest/request"
"github.com/crusttech/crust/compose/types"
"github.com/crusttech/crust/internal/auth"
"github.com/pkg/errors"

View File

@@ -5,9 +5,9 @@ import (
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/internal/service"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/service"
"github.com/crusttech/crust/compose/rest/request"
"github.com/crusttech/crust/compose/types"
"github.com/pkg/errors"
)

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -23,7 +23,7 @@ import (
"github.com/go-chi/chi"
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/rest/request"
)
// Internal API interface

View File

@@ -3,7 +3,7 @@ package rest
import (
"net/http"
"github.com/crusttech/crust/crm/internal/service"
"github.com/crusttech/crust/compose/internal/service"
)
func middlewareAllowedAccess(next http.Handler) http.Handler {

View File

@@ -5,9 +5,9 @@ import (
"github.com/titpetric/factory/resputil"
"github.com/crusttech/crust/crm/internal/service"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/crm/types"
"github.com/crusttech/crust/compose/internal/service"
"github.com/crusttech/crust/compose/rest/request"
"github.com/crusttech/crust/compose/types"
)
type (

View File

@@ -3,8 +3,8 @@ package rest
import (
"context"
"github.com/crusttech/crust/crm/internal/service"
"github.com/crusttech/crust/crm/rest/request"
"github.com/crusttech/crust/compose/internal/service"
"github.com/crusttech/crust/compose/rest/request"
"github.com/crusttech/crust/internal/mail"
"github.com/pkg/errors"

Some files were not shown because too many files have changed in this diff Show More