Skip to content

Commit 2679e55

Browse files
committed
private
1 parent dec1a76 commit 2679e55

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

dbos/dbos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ type dbosContext struct {
166166
workflowScheduler *cron.Cron
167167

168168
// Serializer for encoding/decoding workflow data
169-
serializer Serializer
169+
serializer serializer
170170

171171
// logger
172172
logger *slog.Logger
@@ -191,7 +191,7 @@ func (c *dbosContext) Value(key any) any {
191191
// getSerializer extracts the serializer from a DBOSContext.
192192
// Returns the serializer if the context is a *dbosContext with a configured serializer,
193193
// or nil if the context is not a *dbosContext (for testing/mocking scenarios).
194-
func getSerializer(ctx DBOSContext) Serializer {
194+
func getSerializer(ctx DBOSContext) serializer {
195195
if dbosCtx, ok := ctx.(*dbosContext); ok {
196196
return dbosCtx.serializer
197197
}

dbos/serialization.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ import (
99
"strings"
1010
)
1111

12-
// Serializer defines the interface for pluggable serializers.
12+
// serializer defines the interface for pluggable serializers.
1313
// Encode and Decode are called during database storage and retrieval respectively.
14-
type Serializer interface {
14+
type serializer interface {
1515
// Encode serializes data to a string for database storage
1616
Encode(data any) (string, error)
1717
// Decode deserializes data from a string
1818
Decode(data *string) (any, error)
1919
}
2020

21-
func isGobSerializer(s Serializer) bool {
21+
func isGobSerializer(s serializer) bool {
2222
_, ok := s.(*GobSerializer)
2323
return ok
2424
}
@@ -57,7 +57,7 @@ func init() {
5757
safeGobRegister(gobValue{})
5858
}
5959

60-
// GobSerializer implements Serializer using encoding/gob
60+
// GobSerializer implements serializer using encoding/gob
6161
type GobSerializer struct{}
6262

6363
func NewGobSerializer() *GobSerializer {
@@ -108,7 +108,7 @@ func (g *GobSerializer) Decode(data *string) (any, error) {
108108
}
109109

110110
// deserialize decodes an encoded string directly into a typed variable.
111-
func deserialize[T any](serializer Serializer, encoded *string) (T, error) {
111+
func deserialize[T any](serializer serializer, encoded *string) (T, error) {
112112
var zero T
113113

114114
if serializer == nil {

0 commit comments

Comments
 (0)