Store contains all data for one session process with specific id.
| 44 | |
| 45 | // Store contains all data for one session process with specific id. |
| 46 | type Store interface { |
| 47 | Set(ctx context.Context, key, value interface{}) error // Set set session value |
| 48 | Get(ctx context.Context, key interface{}) interface{} // Get get session value |
| 49 | Delete(ctx context.Context, key interface{}) error // Delete delete session value |
| 50 | SessionID(ctx context.Context) string // SessionID return current sessionID |
| 51 | SessionReleaseIfPresent(ctx context.Context, w http.ResponseWriter) // SessionReleaseIfPresent release the resource & save data to provider & return the data when the session is present, not all implementation support this feature, you need to check if the specific implementation if support this feature. |
| 52 | SessionRelease(ctx context.Context, w http.ResponseWriter) // SessionRelease release the resource & save data to provider & return the data |
| 53 | Flush(ctx context.Context) error // Flush delete all data |
| 54 | } |
| 55 | |
| 56 | // Provider contains global session methods and saved SessionStores. |
| 57 | // it can operate a SessionStore by its id. |
no outgoing calls
no test coverage detected
searching dependent graphs…