// SessionID returns the session ID stored in the cookie's value field.
// It will return a errNoSession error if no session exists.
161926
func (s *StorageOverseer) SessionID(w http.ResponseWriter, r *http.Request) (string, error) {
	return s.options.getCookieValue(w, r)
}
1255334
func randomId() string {
	b := randomBytesMod(idLen, byte(len(idChars)))
	for i, c := range b {
		b[i] = idChars[c]
	}
	return string(b)
}
437375
func (d *driver) InstanceID(
	ctx types.Context,
	opts types.Store) (*types.InstanceID, error) {

	return d.getInstanceID()
}
1181497
func (s *CreatePlayerSessionsInput) SetGameSessionId(v string) *CreatePlayerSessionsInput {
	s.GameSessionId = &v
	return s
}
468501
func (s *ResumeSessionInput) SetSessionId(v string) *ResumeSessionInput {
	s.SessionId = &v
	return s
}
49734
func NewSessionIDFromPubKey(pubKey *btcec.PublicKey) SessionID {
	var sid SessionID
	copy(sid[:], pubKey.SerializeCompressed())
	return sid
}
236713
func (_class EventClass) GetCurrentID(sessionID SessionRef) (_retval int, _err error) {
	_method := "event.get_current_id"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertIntToGo(_method + " -> ", _result.Value)
	return
}
1056289
func (s *Server) ID() string {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.info.ID
}
1022786
func RequestID(c *web.C, h http.Handler) http.Handler {
	return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
		id := r.Header.Get(RequestIDHeader)
		if id == "" {
			id = fmt.Sprintf("%s-%d", reqPrefix, atomic.AddInt64(&reqID, 1))
		}
		c.Env[middleware.RequestIDKey] = id

		h.ServeHTTP(rw, r)
	})
}
1270821
func (s Session) ID() string {
	if sessionIDStr, ok := s[SessionIDKey]; ok {
		return sessionIDStr.(string)
	}

	buffer := uuid.NewV4()

	s[SessionIDKey] = hex.EncodeToString(buffer.Bytes())
	return s[SessionIDKey].(string)
}
14028
func (session *Session) ID(id interface{}) *Session {
	session.Statement.Id(id)
	return session
}
569733
func (s *Service) UserID(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()

	idStr := httprouter.GetParamFromContext(ctx, "id")
	id, err := strconv.ParseUint(idStr, 10, 64)
	if err != nil {
		Error(w, http.StatusBadRequest, fmt.Sprintf("invalid user id: %s", err.Error()), s.Logger)
		return
	}
	user, err := s.Store.Users(ctx).Get(ctx, chronograf.UserQuery{ID: &id})
	if err != nil {
		Error(w, http.StatusBadRequest, err.Error(), s.Logger)
		return
	}

	orgID := httprouter.GetParamFromContext(ctx, "oid")
	res := newUserResponse(user, orgID)
	location(w, res.Links.Self)
	encodeJSON(w, http.StatusOK, res, s.Logger)
}
996763
func (pder *CookieProvider) SessionRead(sid string) (Store, error) {
	maps, _ := decodeCookie(pder.block,
		pder.config.SecurityKey,
		pder.config.SecurityName,
		sid, pder.maxlifetime)
	if maps == nil {
		maps = make(map[interface{}]interface{})
	}
	rs := &CookieSessionStore{sid: sid, values: maps}
	return rs, nil
}
622316
func (i *ModelInfo) EntityId() EntityId {
	return EntityId{
		Kind:      "model",
		ModelUUID: i.ModelUUID,
		Id:        i.ModelUUID,
	}
}
96822
func (n NetID) ID() []byte {
	switch n.Type() {
	case 0, 1:
		return n.getID(6)
	case 2:
		return n.getID(9)
	case 3, 4, 5, 6, 7:
		return n.getID(21)
	default:
		return nil
	}
}
1025419
func (s *UpdateGameSessionInput) SetGameSessionId(v string) *UpdateGameSessionInput {
	s.GameSessionId = &v
	return s
}
341085
func (s *CreateGameSessionInput) SetGameSessionId(v string) *CreateGameSessionInput {
	s.GameSessionId = &v
	return s
}