github.com/pelicanplatform/pelican@v1.0.5/web_ui/ui_windows.go (about)

     1  //go:build windows
     2  
     3  /***************************************************************
     4   *
     5   * Copyright (C) 2023, Pelican Project, Morgridge Institute for Research
     6   *
     7   * Licensed under the Apache License, Version 2.0 (the "License"); you
     8   * may not use this file except in compliance with the License.  You may
     9   * obtain a copy of the License at
    10   *
    11   *    http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   *
    19   ***************************************************************/
    20  
    21  package web_ui
    22  
    23  import (
    24  	"github.com/pkg/errors"
    25  	log "github.com/sirupsen/logrus"
    26  )
    27  
    28  func doReload() error {
    29  	db := authDB.Load()
    30  	if db == nil {
    31  		log.Debug("Cannot reload auth database - not configured")
    32  		return nil
    33  	}
    34  	err := db.Reload(nil)
    35  	if err != nil {
    36  		log.Warningln("Failed to reload auth database:", err)
    37  		return err
    38  	}
    39  	log.Debug("Successfully reloaded the auth database")
    40  	return nil
    41  }
    42  
    43  func WritePasswordEntry(_, _ string) error {
    44  	return errors.New("WritePasswordEntry not implemented on Windows")
    45  }