-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: merge master into v1.14.x (#31) * feat: add the example of transform carbon (#21) * feat: add the example of transform carbon * optimize unit test * optimize unit test * Switch sqlite * fix: unit tests (#23) * fix: unit tests * remove postgres * remove db * feat: add CRUD example (#24) * feat: add curl example * add resource route * update comments * feat: sync latest framework changes (#20) * feat: sync latest framework changes * feat: add rate limiter example * fix: lint * fix: lint * fix: lint * fix: lint * feat: add throttle test * feat: optimize throttle test * feat: bump postgres version to 16 * feat: modify port * fix: test * fix: test * optimize test * optimize test * optimize test * optimize test --------- Co-authored-by: Bowen <[email protected]> * upgrade v1.14.5 * optimize test cases * demo: auth (#27) * demo: auth * rename * rename * upgrade: v1.14.7 (#29) --------- Co-authored-by: 耗子 <[email protected]> * fix: [#523] [Bug] The same listener can not be registered by multiple events, framework will threw an error: job signature duplicate (#33) * fix: [#523] [Bug] The same listener can not be registered by multiple events, framework will threw an error: job signature duplicate * Optimize test * Update go.mod * Update go.mod * Add redis * Add GraphQL (#34) * Add graphql setup * Missed modified files --------- Co-authored-by: 耗子 <[email protected]> Co-authored-by: Viet Pham <[email protected]>
- Loading branch information
1 parent
77b4331
commit 14e08df
Showing
22 changed files
with
5,136 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
with: | ||
redis-version: 7 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package events | ||
|
||
import "github.com/goravel/framework/contracts/event" | ||
|
||
type OrderCanceled struct { | ||
} | ||
|
||
func NewOrderCanceled() *OrderCanceled { | ||
return &OrderCanceled{} | ||
} | ||
|
||
func (receiver *OrderCanceled) Handle(args []event.Arg) ([]event.Arg, error) { | ||
return args, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package events | ||
|
||
import "github.com/goravel/framework/contracts/event" | ||
|
||
type OrderShipped struct { | ||
} | ||
|
||
func NewOrderShipped() *OrderShipped { | ||
return &OrderShipped{} | ||
} | ||
|
||
func (receiver *OrderShipped) Handle(args []event.Arg) ([]event.Arg, error) { | ||
return args, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package listeners | ||
|
||
import ( | ||
"github.com/goravel/framework/contracts/event" | ||
"github.com/spf13/cast" | ||
) | ||
|
||
var TestResultOfSendShipmentNotification []string | ||
|
||
type SendShipmentNotification struct { | ||
} | ||
|
||
func NewSendShipmentNotification() *SendShipmentNotification { | ||
return &SendShipmentNotification{} | ||
} | ||
|
||
func (receiver *SendShipmentNotification) Signature() string { | ||
return "send_shipment_notification" | ||
} | ||
|
||
func (receiver *SendShipmentNotification) Queue(args ...any) event.Queue { | ||
return event.Queue{ | ||
Enable: true, | ||
Connection: "", | ||
Queue: "", | ||
} | ||
} | ||
|
||
func (receiver *SendShipmentNotification) Handle(args ...any) error { | ||
if len(args) > 0 { | ||
TestResultOfSendShipmentNotification = append(TestResultOfSendShipmentNotification, cast.ToString(args[0])) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.