I have two modules Service and Consumer in a repository:
daggerverse
├── .git
├── service
│ ├── dagger.json
│ └── main.go
└── consumer
├── dagger.json
└── main.go
I would like the Service.GetInfo function to behave differently when it is called from the Consumer module compared to other modules/the cli.
I have been playing around passing the output of dag.CurrentModule().ID(ctx) as an input but I do not really want to hard code the value in the Service module.
Is there a way to retrieve the top level directory that contains both of them and hash it? Any other ideas on how to validate the caller's identity?
Thank you for your help!