misc-service

command module
v0.0.0-...-eab1977 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: LGPL-2.1 Imports: 15 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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