package fooservice import ( "github.com/segmentio/ksuid" pb "github.com/lusis/foobar/pb" storer "github.com/lusis/foobar/storer" ) // FooService implements the pb.FooService type FooService struct { pb.UnimplementedFooServiceServer store storer.FooEntriesStorer idFunc func() string } func defaultIDFunc() string { return ksuid.New().String() } // New ... func New(store storer.FooEntriesStorer) (*FooService, error) { return &FooService{ store: store, idFunc: defaultIDFunc, }, nil }