Skip to content

Instantly share code, notes, and snippets.

View jesusjavierdediego's full-sized avatar

Jesus de Diego jesusjavierdediego

View GitHub Profile
{
"info": {
"_postman_id": "92479538-668b-4f98-abaa-7eb43a36947c",
"name": "XQLedger",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "959896"
},
"item": [
{
"name": "Get record rdb",
#!/bin/bash
docker run -d --name kong-gateway \
--network=kong-net \
-v "$(pwd):<YOUR PATH HERE>/kong" \
-e "KONG_DATABASE=off" \
-e "KONG_DECLARATIVE_CONFIG=<YOUR PATH HERE>/kong.yml" \
-e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \
-e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \
-e "KONG_PROXY_ERROR_LOG=/dev/stderr" \
_format_version: "2.1"
_transform: true
services:
- host: <YOUR API HERE>
name: TiredfulAPI
port: 8005
protocol: http
routes:
- name: CSS
package grpc
import (
gomock "github.com/golang/mock/gomock"
"golang.org/x/net/context"
"time"
"testing"
. "github.com/smartystreets/goconvey/convey"
utils "me/project/utils"
mock "me/project/grpc/grpcmock"
package grpcmock
import (
"google.golang.org/grpc"
gomock "github.com/golang/mock/gomock"
context "golang.org/x/net/context"
pb "me/project/protobuf"
)
type MockDigitalIdentityServiceClient struct {
version: v1beta1
lint:
use:
- DEFAULT
- FILE_LOWER_SNAKE_CASE
- COMMENTS
except:
- ENUM_NO_ALLOW_ALIAS
- IMPORT_NO_PUBLIC
- PACKAGE_AFFINITY
syntax = "proto3";
package idrproto;
option go_package = "protobuf";
option optimize_for = SPEED;
message IDR {
ID user_id = 1;
public KafkaProducer<String, String> getBatchProducer() {
Properties properties = new Properties();
properties.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
properties.setProperty(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
properties.setProperty(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
//safe producer
properties.setProperty(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG, "true");
properties.setProperty(ProducerConfig.ACKS_CONFIG, "all");
properties.setProperty(ProducerConfig.RETRIES_CONFIG, String.valueOf(Integer.MAX_VALUE));
def validateAdESSignatures(businessId: String, filePath: String, packInfoOpt: Option[(String, Pack)]): (DocumentValidationResponse, Int) = {
import eu.europa.esig.dss.validation._
import eu.europa.esig.dss.validation.reports.Reports
val file: File = new File(filePath)
val document: DSSDocument = new FileDocument(file)
val pdfValidator: PDFDocumentValidator = new PDFDocumentValidator(document)
val errors: ArrayBuffer[String] = ArrayBuffer.empty[String]
if (pdfValidator.isSupported(document)) {
val certificateVerifier: CommonCertificateVerifier = new CommonCertificateVerifier()
message DSR {
string correlationid = 1;
int64 requestTime = 2;
string authtoken = 3;
SignatureRequest SignatureRequest = 4;
DocumentReference document = 5;
OperationalContext context = 6;
}
// *