README ¶ misc-service Misc services for multiple purposes at the same time A. Services included LDAP Server with Postgresql backend Add/Delete/Modify/Search/Bind/Unbind Initialize LDAP TLS/StartTLS RootDSE/Modify password Full text search service Insert or update/Delete/Simple search Small object storage Insert/Delete/Get file content B. API B.1 LDAP: standard LDAP client B.2 Full text search service - http api Insert or update: PUT /full_text/document/:doc_id Delete: DELETE /full_text/document/:doc_id Search: GET /full_text/documents?q=keyword Document definition: package full_text type CommonDocument struct { Id string `json:"doc_id" form:"doc_id"` Body string `json:"body" form:"body"` } B.3 Small object storage - http api Insert: PUT /small_obj/:doc_id - Request MIME: multipart/form-data with file field for object content Delete: DELETE /small_obj/:doc_id Get file content: GET /small_obj/file_content/:doc_id - Response MIME: application/octet-stream C. Dependency services Postgresql D. Utility commands 1. Generate certificate using OpenSSL openssl genrsa -des3 -out example.ldap.enc.key 2048 openssl rsa -in example.ldap.enc.key -out example.ldap.key openssl req -new -key example.ldap.key -out example.ldap.csr openssl x509 -req -days 36500 -in example.ldap.csr -signkey example.ldap.key -out example.ldap.crt E. Dependencies github.com/BurntSushi/toml - toml configuration github.com/jackc/pgx/v4 - postgresql client github.com/jimlambrt/gldap - ldap client github.com/gin-gonic/gin - http service github.com/spf13/afero - file system github.com/blevesearch/bleve - full text search Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Directories ¶ Show internal Expand all Path Synopsis config dratelimiter fulltextsearch id ldap pgbackend smallobj Click to show internal directories. Click to hide internal directories.