pakakeh

package module
v0.60.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2025 License: BSD-3-Clause Imports: 0 Imported by: 0

README

import "git.sr.ht/~shulhan/pakakeh.go"

Go documentation.

"pakakeh.go" is a collection of tools, public HTTP APIs, and libraries written and for working with Go programming language.

This Go module usually released every month, at the first week of the month.

Public APIs

slack:: Package slack provide a simple API for sending message to Slack using only standard packages.

telegram/bot:: Package bot implement the Telegram Bot API.

Command Line Interface

ansua:: The ansua command run a timer on defined duration and optionally run a command when timer finished.

bcrypt:: CLI to compare or generate hash using bcrypt.

emaildecode:: Program emaildecode convert the email body from quoted-printable to plain text.

epoch:: Program epoch print the current date and time (Unix seconds, milliseconds, nanoseconds, local time, and UTC time) or the date and time based on the epoch on first parameter.

gofmtcomment:: Program to convert multi lines "/**/" comments into single line "//" format.

httpdfs:: Program httpdfs implement [libhttp.Server] with [memfs.MemFS].

ini:: Program ini provide a command line interface to get and set values in the INI file format.

sendemail:: Program sendemail is command line interface that use lib/email and lib/smtp to send email.

smtpcli:: Command line interface SMTP client protocol. This is an example of implementation Client from lib/smtp.

totp:: Program to generate Time-based One-time Password using secret key. This is just an example of implementation of lib/totp. See https://sr.ht/~shulhan/gotp/ for a complete implementation that support encryption.

xtrk:: Program xtrk is command line interface to uncompress and/or unarchive a file. Supported format: bzip2, gzip, tar, zip, tar.bz2, tar.gz.

Libraries

ascii:: A library for working with ASCII characters.

binary:: Package binary complement the standard [binary] package. Currently it implement append-only binary that encode the data using binary.Writer. We call them "Apo" for short.

bytes:: A library for working with slice of bytes.

clise:: Package clise implements circular slice.

contact:: A library to import contact from Google, Microsoft, or Yahoo.

contact/google:: Package "contact/google" implement Google's contact API v3.

contact/microsoft:: Package "contact/microsoft" implement Microsoft's Live contact API v1.0.

contact/vcard:: Package "contact/vcard" implement RFC6350 for encoding and decoding VCard formatted data.

contact/yahoo:: Package yahoo implement user's contacts import using Yahoo API.

crypto:: Package crypto provide a wrapper to simplify working with standard crypto package.

debug:: Package debug provide global debug variable, initialized through environment variable "DEBUG" or directly.

dns:: A library for working with Domain Name System (DNS) protocol.

dsv:: A library for working with delimited separated value (DSV).

email:: A library for working with Internet Message Format, as defined in RFC 5322.

email/dkim:: A library to parse and create DKIM-Signature header field value, as defined in RFC 6376.

email/maildir:: A library to manage email using maildir format.

errors:: Package errors provide an error type with Code, Message, and Name.

git:: A wrapper for git command line interface.

hexdump:: Package hexdump implements reading and writing bytes from and into hexadecimal number. It support parsing output from hexdump(1) tool.

html:: Package html extends the golang.org/x/net/html by providing simplified methods for working with Node.

http:: Package http extends the standard http package with simplified routing handler and builtin memory file system.

http/sseclient:: Package sseclient implement HTTP client for Server-Sent Events (SSE).

ini:: A library for reading and writing INI configuration as defined by Git configuration file syntax.

json:: Package json extends the capabilities of standard json package.

math:: Package math provide generic functions working with math.

math/big:: Package big extends the capabilities of standard "math/big" package by adding custom global precision to Float, Int, and Rat, global rounding mode, and custom bits precision to Float.

memfs:: A library for mapping file system into memory and to generate an embedded Go file from it.

mining:: A library for data mining.

mining/classifiers/cart:: An implementation of the Classification and Regression Tree by Breiman, et al.

mining/classifier/crf:: An implementation of the Cascaded Random Forest (CRF) algorithm, by Baumann, Florian, et al.

mining/classifier/rf:: An implementation of ensemble of classifiers using random forest algorithm by Breiman and Cutler.

mining/gain/gini:: A library to calculate Gini gain.

mining/knn:: An implementation of the K Nearest Neighbor (KNN) using Euclidian to compute the distance between samples.

mining/resampling/lnsmote:: An implementation of the Local-Neighborhood algorithm from the paper of Maciejewski, Tomasz, and Jerzy Stefanowski.

mining/resampling/smote:: An implementation of the Synthetic Minority Oversampling TEchnique (SMOTE).

mining/tree/binary:: An implementation of binary tree.

mlog:: Package mlog implement buffered multi writers of log.

net:: Constants and library for networking.

numbers:: A library for working with integer, float, slice of integer, and slice of floats.

os:: Package os extend the standard os package to provide additional functionalities.

os/exec:: Package exec wrap the standar package "os/exec" to simplify calling Run with stdout and stderr.

paseto:: A simple, ready to use, implementation of Platform-Agnostic SEcurity TOkens (PASETO).

path:: Package path implements utility routines for manipulating slash-separated paths.

play:: Package play provides callable APIs and HTTP handlers to format, run, and test Go code, similar to Go playground but using HTTP instead of WebSocket.

reflect:: Package reflect extends the standard reflect package.

runes:: A library for working with slice of rune.

slices:: Package slices complement the standard slices package for working with slices with comparable and [cmp.Ordered] types.

smtp:: A library for building SMTP server or client. This package is working in progress.

spf:: Package spf implement Sender Policy Framework (SPF) per RFC 7208.

sql:: Package sql extends the standard library "database/sql.DB" that provide common functionality across DBMS.

ssh:: Package ssh provide a wrapper for golang.org/x/crypto/ssh and a parser for SSH client configuration specification ssh_config(5).

ssh/sftp:: Package sftp implement native SSH File Transport Protocol v3.

sshconfig:: Package config provide the ssh_config(5) parser and getter.

strings:: A library for working with slice of string.

tabula:: A library for working with rows, columns, or matrix (table), or in another terms working with data set.

telemetry:: Package telemetry is a library for collecting various [Metric], for example from standard runtime/metrics, and send or write it to one or more [Forwarder].

test:: A library for helping with testing.

test/httptest:: Package httptest implement testing HTTP package.

test/mock:: Package mock provide a mocking for standard output and standard error.

text:: A library for working with text.

text/diff:: Package diff implement text comparison.

time:: A library for working with time.

totp:: Package totp implement Time-Based One-Time Password Algorithm based on RFC 6238.

watchfs:: Package watchfs implement naive file and directory watcher. This package is deprecated, we keep it here for historical only. The new implementation should use "watchfs/v2".

watchfs/v2:: Package watchfs implement naive file watcher. The version 2 simplify watching single file and directory. For directory watcher, it watch only one file instead of all included files.

websocket:: The WebSocket library for server and client. This WebSocket library has been tested with autobahn testsuite with 100% success rate. the status report.

xmlrpc:: Package xmlrpc provide an implementation of XML-RPC specification.

Changelog

Latest CHANGELOG.

Credits

Autobahn testsuite for testing WebSocket library.

That's it! Happy hacking!

Documentation

Overview

Package pakakeh contains public APIs and libraries for working with Go language, and tools written in Go.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version of this module.
	Version = `0.60.0`
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
api
slack
Package slack provide a simple API for sending message to Slack using only standard packages.
Package slack provide a simple API for sending message to Slack using only standard packages.
telegram/bot
Package bot implement the Telegram Bot API https://core.telegram.org/bots/api.
Package bot implement the Telegram Bot API https://core.telegram.org/bots/api.
cmd
_gofilemode
Program gofilemode inspect the Go file mode [1].
Program gofilemode inspect the Go file mode [1].
ansua
Command ansua is CLI to help tracking time.
Command ansua is CLI to help tracking time.
bcrypt
Command bcrypt implements command-line interface to generate and compare bcrypt hash.
Command bcrypt implements command-line interface to generate and compare bcrypt hash.
emaildecode
Program emaildecode convert the email body from quoted-printable to plain text.
Program emaildecode convert the email body from quoted-printable to plain text.
epoch
Program epoch print the current date and time (Unix seconds, milliseconds, nanoseconds, local time, and UTC time) or the date and time based on the epoch on first parameter.
Program epoch print the current date and time (Unix seconds, milliseconds, nanoseconds, local time, and UTC time) or the date and time based on the epoch on first parameter.
gocheck
Program gocheck implement go static analysis using [Analyzer] that are not included in the default go vet.
Program gocheck implement go static analysis using [Analyzer] that are not included in the default go vet.
gofmtcomment
Command gofmtcomment is a program to convert "/**/" comment into "//".
Command gofmtcomment is a program to convert "/**/" comment into "//".
httpdfs
Program httpdfs implement libhttp.Server with memfs.MemFS.
Program httpdfs implement libhttp.Server with memfs.MemFS.
ini
Command ini provide a command line interface to get and set values in the [INI file format].
Command ini provide a command line interface to get and set values in the [INI file format].
sendemail
Program sendemail is command line interface that use lib/email and lib/smtp to send email.
Program sendemail is command line interface that use lib/email and lib/smtp to send email.
smtpcli
Command smtpcli provide a command line interface to SMTP client protocol.
Command smtpcli provide a command line interface to SMTP client protocol.
totp
Program totp generate Time-based One-time Password from secret key.
Program totp generate Time-based One-time Password from secret key.
xtrk
Command xtrk is command line interface to uncompress and/or unarchive a file.
Command xtrk is command line interface to uncompress and/or unarchive a file.
internal
bytes
Package bytes is the internal, shared functions for manipulating bytes, created to prevent import cycle.
Package bytes is the internal, shared functions for manipulating bytes, created to prevent import cycle.
lib
_hunspell
Package hunspell is a library to parse the Hunspell file format.
Package hunspell is a library to parse the Hunspell file format.
ascii
Package ascii provide a library for working with ASCII characters.
Package ascii provide a library for working with ASCII characters.
binary
Package binary complement the standard binary package.
Package binary complement the standard binary package.
bytes
Package bytes provide a library for working with byte or slice of bytes.
Package bytes provide a library for working with byte or slice of bytes.
clise
Package clise implements circular slice.
Package clise implements circular slice.
contact
Package contact provide a library to import contact from Google, Microsoft, and Yahoo.
Package contact provide a library to import contact from Google, Microsoft, and Yahoo.
contact/google
Package google implement Google's contact API v3.
Package google implement Google's contact API v3.
contact/microsoft
Package microsoft implement Microsoft's Live contact API v1.0.
Package microsoft implement Microsoft's Live contact API v1.0.
contact/vcard
Package vcard implement RFC6350 for encoding and decoding VCard formatted data.
Package vcard implement RFC6350 for encoding and decoding VCard formatted data.
contact/yahoo
Package yahoo implement user's contacts import using Yahoo API.
Package yahoo implement user's contacts import using Yahoo API.
crypto
Package crypto provide a wrapper for standard crypto package and golang.org/x/crypto.
Package crypto provide a wrapper for standard crypto package and golang.org/x/crypto.
debug
Package debug provide library for profiling Go program.
Package debug provide library for profiling Go program.
dns
Package dns implement DNS client and server.
Package dns implement DNS client and server.
dsv
Package dsv is a library for working with delimited separated value (DSV).
Package dsv is a library for working with delimited separated value (DSV).
email
Package email provide a library for working with Internet Message Format as defined in [RFC 5322].
Package email provide a library for working with Internet Message Format as defined in [RFC 5322].
email/dkim
Package dkim provide a library to parse and create DKIM-Signature header field value, as defined in RFC 6376, DomainKeys Identified Mail (DKIM) Signatures.
Package dkim provide a library to parse and create DKIM-Signature header field value, as defined in RFC 6376, DomainKeys Identified Mail (DKIM) Signatures.
email/maildir
Package maildir provide a library to manage message (email), and its folder, using maildir format.
Package maildir provide a library to manage message (email), and its folder, using maildir format.
errors
Package errors provide an error type with code.
Package errors provide an error type with code.
git
Package git provide a wrapper for git command line interface.
Package git provide a wrapper for git command line interface.
goanalysis
Package goanalysis implement go static analysis using [Analyzer] that are not included in the default "go vet", but included in the [passes] directory, including
Package goanalysis implement go static analysis using [Analyzer] that are not included in the default "go vet", but included in the [passes] directory, including
hexdump
Package hexdump implements reading and writing bytes from and into hexadecimal number.
Package hexdump implements reading and writing bytes from and into hexadecimal number.
html
Package html extends the golang.org/x/net/html by providing simplified methods to Node.
Package html extends the golang.org/x/net/html by providing simplified methods to Node.
http
Package http implement custom HTTP server with memory file system and simplified routing handler.
Package http implement custom HTTP server with memory file system and simplified routing handler.
http/sseclient
Package sseclient implement HTTP client for Server-Sent Events (SSE).
Package sseclient implement HTTP client for Server-Sent Events (SSE).
ini
Package ini implement reading and writing INI text format as defined by [Git configuration] file syntax.
Package ini implement reading and writing INI text format as defined by [Git configuration] file syntax.
json
Package json provide a library for working with JSON.
Package json provide a library for working with JSON.
math
Package math provide generic functions working with math.
Package math provide generic functions working with math.
math/big
Package big extends the capabilities of standard "math/big" package by adding custom global precision to Float and Rat; and global rounding mode, and bits precision to Float.
Package big extends the capabilities of standard "math/big" package by adding custom global precision to Float and Rat; and global rounding mode, and bits precision to Float.
memfs
Package memfs provide a library for mapping file system into memory and/or to embed it inside go source file.
Package memfs provide a library for mapping file system into memory and/or to embed it inside go source file.
mining
Package mining provides library for data mining and statistic related to machine learning.
Package mining provides library for data mining and statistic related to machine learning.
mining/classifier
Package classifier provides machine learning classifier library, including CART, Random Forest, Cascaded Random Forest, and KNN.
Package classifier provides machine learning classifier library, including CART, Random Forest, Cascaded Random Forest, and KNN.
mining/classifier/cart
Package cart implement the Classification and Regression Tree by Breiman, et al.
Package cart implement the Classification and Regression Tree by Breiman, et al.
mining/classifier/crf
Package crf implement the cascaded random forest algorithm, proposed by Baumann et.al in their paper:
Package crf implement the cascaded random forest algorithm, proposed by Baumann et.al in their paper:
mining/classifier/rf
Package rf implement ensemble of classifiers using random forest algorithm by Breiman and Cutler.
Package rf implement ensemble of classifiers using random forest algorithm by Breiman and Cutler.
mining/gain/gini
Package gini contain function to calculating Gini gain.
Package gini contain function to calculating Gini gain.
mining/knn
Package knn implement the K Nearest Neighbor using Euclidean to compute the distance between samples.
Package knn implement the K Nearest Neighbor using Euclidean to compute the distance between samples.
mining/resampling
Package resampling provide common interface, constants, and methods for resampling modules.
Package resampling provide common interface, constants, and methods for resampling modules.
mining/resampling/lnsmote
Package lnsmote implement the Local-Neighborhood algorithm from the paper,
Package lnsmote implement the Local-Neighborhood algorithm from the paper,
mining/resampling/smote
Package smote resamples a dataset by applying the Synthetic Minority Oversampling TEchnique (SMOTE).
Package smote resamples a dataset by applying the Synthetic Minority Oversampling TEchnique (SMOTE).
mining/tree/binary
Package binary contain implementation of binary tree.
Package binary contain implementation of binary tree.
mlog
Package mlog implement buffered multi writers of log.
Package mlog implement buffered multi writers of log.
net
Package net provide constants and library for networking.
Package net provide constants and library for networking.
numbers
Package numbers provide miscellaneous functions for working with integer and float.
Package numbers provide miscellaneous functions for working with integer and float.
os
Package os extend the standard os package to provide additional functionalities.
Package os extend the standard os package to provide additional functionalities.
os/exec
Package exec wrap the standar package "os/exec" to simplify calling Run with stdout and stderr.
Package exec wrap the standar package "os/exec" to simplify calling Run with stdout and stderr.
paseto
Package paseto provide a simple, ready to use, opinionated implementation of Platform-Agnostic SEcurity TOkens (PASETOs) v2 as defined in [paseto-rfc-01].
Package paseto provide a simple, ready to use, opinionated implementation of Platform-Agnostic SEcurity TOkens (PASETOs) v2 as defined in [paseto-rfc-01].
path
Package path implements utility routines for manipulating slash-separated paths.
Package path implements utility routines for manipulating slash-separated paths.
play
Package play provides callable APIs and HTTP handlers to format, run, and test Go code, similar to Go playground but using HTTP instead of WebSocket.
Package play provides callable APIs and HTTP handlers to format, run, and test Go code, similar to Go playground but using HTTP instead of WebSocket.
reflect
Package reflect extends the standard reflect package.
Package reflect extends the standard reflect package.
runes
Package runes provide a library for working with a single rune or slice of rune.
Package runes provide a library for working with a single rune or slice of rune.
slices
Package slices complement the standard slices package for working with slices comparable and cmp.Ordered types.
Package slices complement the standard slices package for working with slices comparable and cmp.Ordered types.
smtp
Package smtp provide a library for building SMTP server and client.
Package smtp provide a library for building SMTP server and client.
spf
Package spf implement Sender Policy Framework (SPF) per RFC 7208.
Package spf implement Sender Policy Framework (SPF) per RFC 7208.
sql
Package sql is an extension to standard library "database/sql.DB" that provide common functionality across DBMS.
Package sql is an extension to standard library "database/sql.DB" that provide common functionality across DBMS.
ssh
Package ssh provide a wrapper for golang.org/x/crypto/ssh and a parser for SSH client configuration specification ssh_config(5).
Package ssh provide a wrapper for golang.org/x/crypto/ssh and a parser for SSH client configuration specification ssh_config(5).
ssh/sftp
Package sftp implement SSH File Transfer Protocol v3 as defined in [draft-ietf-secsh-filexfer-02.txt].
Package sftp implement SSH File Transfer Protocol v3 as defined in [draft-ietf-secsh-filexfer-02.txt].
sshconfig
Package sshconfig provide the [ssh_config(5)] parser and getter.
Package sshconfig provide the [ssh_config(5)] parser and getter.
strings
Package strings provide a library for working with string or slice of strings.
Package strings provide a library for working with string or slice of strings.
tabula
Package tabula is a Go library for working with rows, columns, or matrix (table), or in another terms working with data set.
Package tabula is a Go library for working with rows, columns, or matrix (table), or in another terms working with data set.
telemetry
Package telemetry is a library for collecting various Metric, for example from standard runtime/metrics, and send or write it to one or more Forwarder.
Package telemetry is a library for collecting various Metric, for example from standard runtime/metrics, and send or write it to one or more Forwarder.
telemetry/internal/cmd/agent-example
Program agent-example provide an example of how to create agent.
Program agent-example provide an example of how to create agent.
test
Package test provide library for helping with testing.
Package test provide library for helping with testing.
test/httptest
Package httptest implement testing HTTP package.
Package httptest implement testing HTTP package.
test/mock
Package mock provide a mocking for standard input, standard output, standard error, io.ReadWriter, and [rand.Reader].
Package mock provide a mocking for standard input, standard output, standard error, io.ReadWriter, and [rand.Reader].
text
Package text provide common a library for working with text.
Package text provide common a library for working with text.
text/diff
Package diff implement text comparison.
Package diff implement text comparison.
time
Package time provide a library for working with time.
Package time provide a library for working with time.
totp
Package totp implement Time-Based One-Time Password Algorithm based on RFC 6238 [1].
Package totp implement Time-Based One-Time Password Algorithm based on RFC 6238 [1].
watchfs
Package watchfs implement naive file and directory watcher.
Package watchfs implement naive file and directory watcher.
watchfs/v2
Package watchfs implement naive file and directory watcher.
Package watchfs implement naive file and directory watcher.
websocket
Package websocket provide a library for WebSocket server or client based on [RFC6455].
Package websocket provide a library for WebSocket server or client based on [RFC6455].
websocket/examples
Package examples provide an example on how to use WebSocket server and client.
Package examples provide an example on how to use WebSocket server and client.
websocket/examples/cmd/client
Program client provide an example of chat client that connect to WebSocket server.
Program client provide an example of chat client that connect to WebSocket server.
websocket/examples/cmd/server
Program server provide an example of WebSocket server as group chat.
Program server provide an example of WebSocket server as group chat.
websocket/internal/autobahn
Package autobahn provides an helper to parse and print reports from result of Autobahn test suite.
Package autobahn provides an helper to parse and print reports from result of Autobahn test suite.
websocket/internal/autobahn/client
Package client provide a program to test WebSocket client implementation with autobahn testsuite.
Package client provide a program to test WebSocket client implementation with autobahn testsuite.
websocket/internal/autobahn/server
Package server provide a program for testing WebSocket server implement with autobahn testsuite.
Package server provide a program for testing WebSocket server implement with autobahn testsuite.
xmlrpc
Package xmlrpc provide an implementation of XML-RPC specification, http://xmlrpc.com/spec.md.
Package xmlrpc provide an implementation of XML-RPC specification, http://xmlrpc.com/spec.md.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL