Documentation ¶
Overview ¶
This file is part of thor (https://github.com/notapipeline/thor).
Copyright (c) 2024 Martin Proffitt <mproffitt@choclab.net>.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
This file is part of thor (https://github.com/notapipeline/thor).
Copyright (c) 2024 Martin Proffitt <mproffitt@choclab.net>.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
This file is part of thor (https://github.com/notapipeline/thor).
Copyright (c) 2024 Martin Proffitt <mproffitt@choclab.net>.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
This file is part of thor (https://github.com/notapipeline/thor).
Copyright (c) 2024 Martin Proffitt <mproffitt@choclab.net>.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- Constants
- Variables
- func CreateSSLCertificates(hostname string) (tls.Certificate, error)
- func LoadSSLCertificates(c *config.Config) (tls.Certificate, error)
- type App
- type Hub
- type LogItem
- type Thor
- type Vault
- func (v *Vault) GetToken() string
- func (v *Vault) RotationCredentials(paths []string, token string) (map[string]string, error)
- func (v *Vault) SetToken(token, key string) error
- func (v *Vault) Thor(t *Thor)
- func (v *Vault) Unwrap(what string) (string, error)
- func (v *Vault) UnwrapWithCheck(what string, requesting *bool) (string, error)
Constants ¶
const ( BUFFER_SIZE int = 1024 BUFFER_SIZE_MAX int = 1048576 TIME_MAX int = 10 INFO int = 1 WARN int = 2 ERROR int = 3 )
const KEYSIZE int = 2048
const LOGOUT_SCRIPT string = `x=($(ps -Ao pid,tt,user | awk '/%s/{print $1}')); { [ ${#x[@]} -gt 0 ] && kill -SIGKILL ${x[@]}; } || echo`
Variables ¶
var (
Duration time.Duration = time.Duration(TIME_MAX) * time.Nanosecond
)
Functions ¶
func CreateSSLCertificates ¶
func CreateSSLCertificates(hostname string) (tls.Certificate, error)
func LoadSSLCertificates ¶
func LoadSSLCertificates(c *config.Config) (tls.Certificate, error)
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub is a helper to handle one to many chat
type LogItem ¶
func NewLogItem ¶
type Thor ¶
type Thor struct {
// contains filtered or unexported fields
}
func (*Thor) RequestToken ¶
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}