mempass-api
is a example RPC service built with Connect and libpass. Its API is defined by a Protocol Buffer schema, and the service
supports the gRPC, gRPC-Web, and Connect protocols.
cp .env.example .env
go run ./cmd/server
docker compose up
curl -i \
--header "Content-Type: application/json" \
--data '{}' \
http://127.0.0.1:4321/mempass.v1.PasswordService/GeneratePasswords
curl -i \
--header "Content-Type: application/json" \
--data '{"preset": "XKCD", "word_list": "POKEMON"}' \
http://127.0.0.1:4321/mempass.v1.PasswordService/GeneratePasswords
curl -i \
--header "Content-Type: application/json" \
--data '{
"preset": "XKCD",
"word_list": "MIDDLE_EARTH",
"case_transform": "SENTENCE",
"num_passwords": 10
}' \
http://127.0.0.1:4321/mempass.v1.PasswordService/GeneratePasswords
grpcurl \
-protoset <(buf build -o -) -plaintext \
-d '{}' \
127.0.0.1:4321 mempass.v1.PasswordService/GeneratePasswords
grpcurl \
-protoset <(buf build -o -) -plaintext \
-d '{"preset": "XKCD", "word_list": "POKEMON"}' \
127.0.0.1:4321 mempass.v1.PasswordService/GeneratePasswords
grpcurl \
-protoset <(buf build -o -) -plaintext \
-d '{
"preset": "XKCD",
"word_list": "MIDDLE_EARTH",
"case_transform": "SENTENCE",
"num_passwords": 10
}' \
127.0.0.1:4321 mempass.v1.PasswordService/GeneratePasswords