github.com/goravel/framework@v1.13.9/contracts/http/view.go (about) 1 package http 2 3 //go:generate mockery --name=View 4 type View interface { 5 // Exists checks if a view with the specified name exists. 6 Exists(view string) bool 7 // Share associates a key-value pair, where the key is a string and the value is of any type, 8 // with the current view context. This shared data can be accessed by other parts of the application. 9 Share(key string, value any) 10 // Shared retrieves the value associated with the given key from the current view context's shared data. 11 // If the key does not exist, it returns the optional default value (if provided). 12 Shared(key string, def ...any) any 13 // GetShared returns a map containing all the shared data associated with the current view context. 14 GetShared() map[string]any 15 }