Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karpovdl/pass
Pass data
https://github.com/karpovdl/pass
golang
Last synced: about 2 months ago
JSON representation
Pass data
- Host: GitHub
- URL: https://github.com/karpovdl/pass
- Owner: karpovdl
- License: mit
- Created: 2020-02-11T18:57:14.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-19T14:35:28.000Z (over 4 years ago)
- Last Synced: 2023-08-04T22:10:54.009Z (over 1 year ago)
- Topics: golang
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# pass
[![License][1]][2] [![golang][10]][11] [![codebeat][20]][21] [![CodeFactor][22]][23]
[1]: https://img.shields.io/badge/license-MIT-blue.svg?label=License&maxAge=86400 "License"
[2]: ./LICENSE[10]: https://img.shields.io/badge/golang-1.14.4-blue.svg?style=flat "Golang"
[11]: https://golang.org[20]: https://codebeat.co/badges/d7a74a17-b99c-4d59-a07d-20685cf169e4 "CODEBEAT"
[21]: https://codebeat.co/projects/github-com-karpovdl-pass-master[22]: https://www.codefactor.io/repository/github/karpovdl/pass/badge "CodeFactor"
[23]: https://www.codefactor.io/repository/github/karpovdl/pass:green_book: [Samples](./SAMPLES.md)
:green_book: [Tests](./TESTS.md)* pass --version, -v
* pass --help, -hTo build an application for windows make script/build.cmd
## run
Application pass - application for pass data
* pass run, pass r - run server
* pass run --help, -hpass run -h - help command
* port, p - port to use listen server
Default: 9000
* pprof, pf - active pprof mode
If `flag` [true], then active pprof, otherwise [false]
Default: false
* pprof_port, pfp - port to use pprof listen server
Default: 9001### run tm
* pass run tm, pass r tm - run aplication for pass data to telegram
* pass run tm --help, -h* bot_token, bt - telegram bot token uuid
* channel_id, cid - telegram channel id
* message, m - telegram messageConfiguration telegram.json file
```
{
"bot_token": "{BOT_TOKEN}",
"channel_id": {CHANNEL_ID},
"message": "{MESSAGE}"
}
```### sample run
Sample run server without parameters
```bash
pass.exe run
```Sample run with active pprof
```bash
pass.exe ^
"run" ^
"--port=9000" ^
"--pprof=true" ^
"--pprof_port=9001"
```Sample pass data to telegram from browser
```http
http://localhost:9000/tm/?bt={BOT_TOKEN}&cid={CHANNEL_ID}&m={MESSAGE}
```Sample pass data to telegram from browser if exist configuration telegram.json file
```http
http://localhost:9000/tm/?m={MESSAGE}
```Sample pass data to telegram from curl
```http
curl -X GET http://localhost:9000/tm/?bt={BOT_TOKEN}&cid={CHANNEL_ID}&m={MESSAGE}
```Sample pass data to telegram from curl if exist configuration telegram.json file
```http
curl -X GET http://localhost:9000/tm/?m={MESSAGE}
```Sample run application with command for pass data only to telegram
```bash
pass.exe ^
"run" ^
"tm" ^
"--bt={BOT_TOKEN}" ^
"--cid={CHANNEL_ID}" ^
"-m={MESSAGE}"
```Sample run application with command for pass data only to telegram if exist configuration telegram.json file
```bash
pass.exe ^
"run" ^
"tm" ^
"-m={MESSAGE}"
```