ops_event.go 624 B

1234567891011121314151617181920212223242526272829
  1. package ops
  2. import (
  3. "context"
  4. "fmt"
  5. "kpt-grpc-demo/config"
  6. filedPb "kpt-grpc-demo/proto/go/backend/ops"
  7. )
  8. type Entry struct {
  9. Config *config.AppConfig
  10. }
  11. func NewStore(cfg *config.AppConfig) (Options, error) {
  12. return &Entry{
  13. Config: cfg,
  14. }, nil
  15. }
  16. func (o *Entry) mustEmbedUnimplementedFieldServiceServer() {
  17. //TODO implement me
  18. panic("implement me")
  19. }
  20. func (o *Entry) CreateFields(ctx context.Context, opt *filedPb.CreatedFiledRequest) (*filedPb.CreatedFiledResponse, error) {
  21. //TODO implement me
  22. fmt.Println("CreateFields===> implement me")
  23. return &filedPb.CreatedFiledResponse{Id: opt.FiledName}, nil
  24. }