// TimeTravelReset allows a user to move forward in the reset process via an authenticated API call [devel-only].
172682
func (h *AccountHandler) TimeTravelReset(ctx context.Context, arg keybase1.TimeTravelResetArg) error {
	mctx := libkb.NewMetaContext(ctx, h.G())
	_, err := mctx.G().API.Post(mctx, libkb.APIArg{
		Endpoint:    "autoreset/timetravel",
		SessionType: libkb.APISessionTypeREQUIRED,
		Args: libkb.HTTPArgs{
			"duration_sec": libkb.I{Val: int(arg.Duration)},
		},
	})

	return err
}
649869
func (c *CompletionManager) Reset() {
	c.selected = -1
	c.verticalScroll = 0
	c.Update(*NewDocument())
	return
}
91745
func (timer *RealRTimer) Reset(d time.Duration) {
	if timer.innerTimer == nil {
		timer.innerTimer = time.NewTimer(d)
	} else {
		timer.innerTimer.Reset(d)
	}
}
577033
func (s *RestoreDBInstanceToPointInTimeInput) SetRestoreTime(v time.Time) *RestoreDBInstanceToPointInTimeInput {
	s.RestoreTime = &v
	return s
}
842366
func (service *IYOEmailAddressValidationService) RequestPasswordReset(request *http.Request, username string, emails []string, langKey string) (key string, err error) {
	pwdMngr := password.NewManager(request)
	token, err := pwdMngr.NewResetToken(username)
	if err != nil {
		return
	}
	if err = pwdMngr.SaveResetToken(token); err != nil {
		return
	}

	translationValues := tools.TranslationValues{
		"passwordreset_title":      nil,
		"passwordreset_text":       nil,
		"passwordreset_buttontext": nil,
		"passwordreset_reason":     nil,
		"passwordreset_subject":    nil,
		"passwordreset_urlcaption": nil,
	}

	translations, err := tools.ParseTranslations(langKey, translationValues)
	if err != nil {
		log.Error("Failed to parse translations: ", err)
		return
	}

	passwordreseturl := fmt.Sprintf("https://%s/login?lang=%s#/resetpassword/%s", request.Host, langKey, url.QueryEscape(token.Token))
	templateParameters := EmailWithButtonTemplateParams{
		UrlCaption: translations["passwordreset_urlcaption"],
		Url:        passwordreseturl,
		Username:   username,
		Title:      translations["passwordreset_title"],
		Text:       translations["passwordreset_text"],
		ButtonText: translations["passwordreset_buttontext"],
		Reason:     translations["passwordreset_reason"],
		LogoUrl:    fmt.Sprintf("https://%s/assets/img/its-you-online.png", request.Host),
	}
	message, err := tools.RenderTemplate(emailWithButtonTemplateName, templateParameters)
	if err != nil {
		return
	}
	go service.EmailService.Send(emails, translations["passwordreset_subject"], message)
	key = token.Token
	return
}
274492
func (d *DepthFirst) Reset() {
	d.stack = d.stack[:0]
	if d.visited != nil {
		d.visited.Clear()
	}
}
366845
func (d *DiskStorer) ResetExpiry(key string) error {
	if !validKey(key) {
		return errNoSession{}
	}

	filePath := path.Join(d.folderPath, key)
	nowTime := time.Now().UTC()

	return os.Chtimes(filePath, nowTime, nowTime)
}
275291
func (f *fakeTimer) Reset(d time.Duration) bool {
	f.fakeClock.lock.Lock()
	defer f.fakeClock.lock.Unlock()

	active := !f.waiter.fired

	f.waiter.fired = false
	f.waiter.targetTime = f.fakeClock.time.Add(d)

	return active
}
993717
func (tracerOptions) TimeNow(timeNow func() time.Time) TracerOption {
	return func(tracer *Tracer) {
		tracer.timeNow = timeNow
	}
}
356265
func (s *RestoreDBClusterToPointInTimeInput) SetRestoreToTime(v time.Time) *RestoreDBClusterToPointInTimeInput {
	s.RestoreToTime = &v
	return s
}
429602
func defaultTTransport(urlstr string, timeoutms int, config *RealisConfig) (thrift.TTransport, error) {
	jar, err := cookiejar.New(nil)
	if err != nil {
		return &thrift.THttpClient{}, errors.Wrap(err, "Error creating Cookie Jar")
	}
	var transport http.Transport
	if config != nil {
		tlsConfig := &tls.Config{}
		if config.InsecureSkipVerify {
			tlsConfig.InsecureSkipVerify = true
		}
		if config.certspath != "" {
			rootCAs, err := GetCerts(config.certspath)
			if err != nil {
				config.logger.Println("error occured couldn't fetch certs")
				return nil, err
			}
			tlsConfig.RootCAs = rootCAs
		}
		if config.clientkey != "" && config.clientcert == "" {
			return nil, fmt.Errorf("have to provide both client key,cert. Only client key provided ")
		}
		if config.clientkey == "" && config.clientcert != "" {
			return nil, fmt.Errorf("have to provide both client key,cert. Only client cert provided ")
		}
		if config.clientkey != "" && config.clientcert != "" {
			cert, err := tls.LoadX509KeyPair(config.clientcert, config.clientkey)
			if err != nil {
				config.logger.Println("error occured loading client certs and keys")
				return nil, err
			}
			tlsConfig.Certificates = []tls.Certificate{cert}
		}
		transport.TLSClientConfig = tlsConfig
	}

	trans, err := thrift.NewTHttpPostClientWithOptions(urlstr+"/api",
		thrift.THttpClientOptions{Client: &http.Client{Timeout: time.Millisecond * time.Duration(timeoutms), Transport: &transport, Jar: jar}})

	if err != nil {
		return &thrift.THttpClient{}, errors.Wrap(err, "Error creating transport")
	}

	if err := trans.Open(); err != nil {
		return &thrift.THttpClient{}, errors.Wrapf(err, "Error opening connection to %s", urlstr)
	}

	return trans, nil
}
1222371
func (t *FakeTimer) Reset(d time.Duration) bool {
	t.time = t.clock.now.Add(d)

	// Empty the channel if already filled.
	select {
	case <-t.c:
	default:
	}

	if t.index >= 0 {
		heap.Fix(&t.clock.timers, t.index)
		return true
	}
	heap.Push(&t.clock.timers, t)
	return false
}
215155
func (c *Context) Reset() {
	c.lock.Lock()
	defer c.lock.Unlock()

	c.pings = nil
	c.redirect = nil
}
373057
func Reset(pipe chan interface{}, url, migrationsPath string) {
	pipe1 := pipep.New()
	go Down(pipe1, url, migrationsPath)
	if ok := pipep.WaitAndRedirect(pipe1, pipe, handleInterrupts()); !ok {
		go pipep.Close(pipe, nil)
		return
	}
	go Up(pipe, url, migrationsPath)
}
1022079
func (r *RedisStorer) ResetExpiry(key string) error {
	return r.client.Expire(key, r.maxAge).Err()
}
1204831
func (m *Manager) ResetRebalanceTimer() {
	m.Lock()
	defer m.Unlock()
	m.rebalanceTimer.Reset(clientRPCMinReuseDuration)
}
1190164
func (r *RollingHDRHistogram) Reset() {
	r.idx = 0
	r.lastRoll = r.clock.UtcNow()
	for _, b := range r.buckets {
		b.Reset()
	}
}