// NewLogoutType returns a new LogoutType instance
481543
func NewLogoutType(Description string) *LogoutType {
	s := new(LogoutType)
	s.Description = Description
	return s
}
2759
func NewLogger(prefixes Prefixes, defaultStyle TextStyle) *Logger {
	prefixes[""] = defaultStyle
	return &Logger{Prefixes: prefixes, output: os.Stdout}
}
539724
func NewOriginLogInfo(AccessMethod *AccessMethodLogInfo) *OriginLogInfo {
	s := new(OriginLogInfo)
	s.AccessMethod = AccessMethod
	return s
}
361591
func newClientByType(
	cred identity.Credentials,
	authMode identity.AuthMode,
	gooseLogger gooselogging.CompatLogger,
	sslHostnameVerification bool,
	certs []string,
) (client.AuthenticatingClient, error) {
	switch {
	case len(certs) > 0:
		tlsConfig := tlsConfig(certs)
		logger.Tracef("using NewClientTLSConfig")
		return client.NewClientTLSConfig(&cred, authMode, gooseLogger, tlsConfig), nil
	case sslHostnameVerification == false:
		logger.Tracef("using NewNonValidatingClient")
		return client.NewNonValidatingClient(&cred, authMode, gooseLogger), nil
	default:
		logger.Tracef("using NewClient")
		return client.NewClient(&cred, authMode, gooseLogger), nil
	}
}
23483
func NewLogger() dlog.Logger {
	return dlog.NewLogger(
		glog.Infoln,
		map[dlog.Level]func(...interface{}){
			dlog.LevelDebug: glog.Infoln,
			dlog.LevelInfo:  glog.Infoln,
			dlog.LevelWarn:  glog.Warningln,
			dlog.LevelError: glog.Errorln,
			// this relies on implementation-specific details of the generic dlog Logger implementation, not good
			dlog.LevelFatal: glog.Fatalln,
			dlog.LevelPanic: glog.Errorln,
		},
	)
}
1291876
func NewLogOptions(l func(string, ...interface{}), ft string, tok ...string) *LogOptions {
	return &LogOptions{
		LogFn:        l,
		Format:       ft,
		Tokens:       tok,
		CustomTokens: make(map[string]func(http.ResponseWriter, *http.Request) string),
		DateFormat:   time.RFC3339,
	}
}
1259255
func New(opts *LoggerOptions) Logger {
	if opts == nil {
		opts = &LoggerOptions{}
	}

	output := opts.Output
	if output == nil {
		output = DefaultOutput
	}

	level := opts.Level
	if level == NoLevel {
		level = DefaultLevel
	}

	mutex := opts.Mutex
	if mutex == nil {
		mutex = new(sync.Mutex)
	}

	l := &intLogger{
		json:       opts.JSONFormat,
		caller:     opts.IncludeLocation,
		name:       opts.Name,
		timeFormat: TimeFormat,
		mutex:      mutex,
		writer:     newWriter(output),
		level:      new(int32),
	}

	if opts.TimeFormat != "" {
		l.timeFormat = opts.TimeFormat
	}

	atomic.StoreInt32(l.level, int32(level))

	return l
}
1123540
func SetLogout(l string) Option {
	return func(h *Handler) error {
		if l == "" {
			return errors.New("logout redirect can't be empty")
		}
		h.redirLogout = l
		return nil
	}
}
463984
func NewRecordType(name string, ts ...Type) *Record {
	return &Record{
		ts:   ts,
		name: name,
	}
}
72490
func NewFileDownloadType(Description string) *FileDownloadType {
	s := new(FileDownloadType)
	s.Description = Description
	return s
}
291706
func NewLoginSuccessType(Description string) *LoginSuccessType {
	s := new(LoginSuccessType)
	s.Description = Description
	return s
}
604135
func NewDefaultType(in interface{}, context *compiler.Context) (*DefaultType, error) {
	errors := make([]error, 0)
	x := &DefaultType{}
	matched := false
	switch in := in.(type) {
	case bool:
		x.Oneof = &DefaultType_Boolean{Boolean: in}
		matched = true
	case string:
		x.Oneof = &DefaultType_String_{String_: in}
		matched = true
	case int64:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	case int32:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	case int:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	case float64:
		x.Oneof = &DefaultType_Number{Number: in}
		matched = true
	case float32:
		x.Oneof = &DefaultType_Number{Number: float64(in)}
		matched = true
	}
	if matched {
		// since the oneof matched one of its possibilities, discard any matching errors
		errors = make([]error, 0)
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
414116
func NewLogger(stdout, stderr io.Writer, debug bool) *Logger {
	return &Logger{stdout: stdout, stderr: stderr, debug: debug}
}
757252
func NewAccountCaptureMigrateAccountType(Description string) *AccountCaptureMigrateAccountType {
	s := new(AccountCaptureMigrateAccountType)
	s.Description = Description
	return s
}
1200335
func newLogOutputView(awsSession *session.Session,
	app *tview.Application,
	lambdaAWSInfos []*LambdaAWSInfo,
	settings map[string]string,
	logger *logrus.Logger) (tview.Primitive, []tview.Primitive) {

	// Log to JSON
	logger.Formatter = &colorizingFormatter{}
	logDataView := tview.NewTextView().
		SetScrollable(true).
		SetDynamicColors(true)
	logDataView.SetChangedFunc(func() {
		logDataView.ScrollToEnd()
	})
	logDataView.SetBorder(true).SetTitle("Output")

	colorWriter := tview.ANSIWriter(logDataView)
	logger.Out = colorWriter
	return logDataView, []tview.Primitive{logDataView}
}
964081
func (d *IdentifyDispatch) OnLogout() {
	d.Lock()
	defer d.Unlock()
	d.listeners = nil
}
153189
func NewImageType(s string) (imageType, error) {
	var e imageType
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}