added chat messages
This commit is contained in:
11
ent/tx.go
11
ent/tx.go
@@ -16,6 +16,8 @@ type Tx struct {
|
||||
Match *MatchClient
|
||||
// MatchPlayer is the client for interacting with the MatchPlayer builders.
|
||||
MatchPlayer *MatchPlayerClient
|
||||
// Messages is the client for interacting with the Messages builders.
|
||||
Messages *MessagesClient
|
||||
// Player is the client for interacting with the Player builders.
|
||||
Player *PlayerClient
|
||||
// RoundStats is the client for interacting with the RoundStats builders.
|
||||
@@ -40,7 +42,7 @@ type Tx struct {
|
||||
}
|
||||
|
||||
type (
|
||||
// Committer is the interface that wraps the Committer method.
|
||||
// Committer is the interface that wraps the Commit method.
|
||||
Committer interface {
|
||||
Commit(context.Context, *Tx) error
|
||||
}
|
||||
@@ -54,7 +56,7 @@ type (
|
||||
// and returns a Committer. For example:
|
||||
//
|
||||
// hook := func(next ent.Committer) ent.Committer {
|
||||
// return ent.CommitFunc(func(context.Context, tx *ent.Tx) error {
|
||||
// return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
|
||||
// // Do some stuff before.
|
||||
// if err := next.Commit(ctx, tx); err != nil {
|
||||
// return err
|
||||
@@ -95,7 +97,7 @@ func (tx *Tx) OnCommit(f CommitHook) {
|
||||
}
|
||||
|
||||
type (
|
||||
// Rollbacker is the interface that wraps the Rollbacker method.
|
||||
// Rollbacker is the interface that wraps the Rollback method.
|
||||
Rollbacker interface {
|
||||
Rollback(context.Context, *Tx) error
|
||||
}
|
||||
@@ -109,7 +111,7 @@ type (
|
||||
// and returns a Rollbacker. For example:
|
||||
//
|
||||
// hook := func(next ent.Rollbacker) ent.Rollbacker {
|
||||
// return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error {
|
||||
// return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
|
||||
// // Do some stuff before.
|
||||
// if err := next.Rollback(ctx, tx); err != nil {
|
||||
// return err
|
||||
@@ -161,6 +163,7 @@ func (tx *Tx) Client() *Client {
|
||||
func (tx *Tx) init() {
|
||||
tx.Match = NewMatchClient(tx.config)
|
||||
tx.MatchPlayer = NewMatchPlayerClient(tx.config)
|
||||
tx.Messages = NewMessagesClient(tx.config)
|
||||
tx.Player = NewPlayerClient(tx.config)
|
||||
tx.RoundStats = NewRoundStatsClient(tx.config)
|
||||
tx.Spray = NewSprayClient(tx.config)
|
||||
|
Reference in New Issue
Block a user