istore: updated
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package config
|
||||
|
||||
const (
|
||||
confdirPath = "/home/ziggi/projects/certman/etc/certmanager"
|
||||
rundirPath = "/home/ziggi/projects/certman/tmp.run"
|
||||
logdirPath = "/home/ziggi/projects/certman/tmp.log"
|
||||
datadirPath = "/home/ziggi/projects/certman/tmp.data"
|
||||
confdirPath = "/home/ziggi/Projects/certman/etc/certmanager"
|
||||
rundirPath = "/home/ziggi/Projects/certman/tmp/run"
|
||||
logdirPath = "/home/ziggi/Projects/certman/tmp/log"
|
||||
datadirPath = "/home/ziggi/Projects/certman/tmp/data"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,73 +3,73 @@ package handler
|
||||
import (
|
||||
"context"
|
||||
|
||||
"certmanager/api/certmanagercontrol"
|
||||
"certmanager/pkg/cmctl"
|
||||
)
|
||||
|
||||
func (hand *Handler) CreateIssuerPair(ctx context.Context, req *certmanagercontrol.CreateIssuerPairParams) (*certmanagercontrol.CreateIssuerPairResult, error) {
|
||||
func (hand *Handler) CreateIssuerPair(ctx context.Context, req *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle CreateIssuerPair request")
|
||||
res, err := hand.lg.CreateIssuerPair(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) ImportIssuerPair(ctx context.Context, req *certmanagercontrol.ImportIssuerPairParams) (*certmanagercontrol.ImportIssuerPairResult, error) {
|
||||
func (hand *Handler) ImportIssuerPair(ctx context.Context, req *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle ImportIssuerPair request")
|
||||
res, err := hand.lg.ImportIssuerPair(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) RevokeIssuerPair(ctx context.Context, req *certmanagercontrol.RevokeIssuerPairParams) (*certmanagercontrol.RevokeIssuerPairResult, error) {
|
||||
func (hand *Handler) RevokeIssuerPair(ctx context.Context, req *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle RevokeIssuerPair request")
|
||||
res, err := hand.lg.RevokeIssuerPair(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) UnrevokeIssuerPair(ctx context.Context, req *certmanagercontrol.UnrevokeIssuerPairParams) (*certmanagercontrol.UnrevokeIssuerPairResult, error) {
|
||||
func (hand *Handler) UnrevokeIssuerPair(ctx context.Context, req *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle UnrevokeIssuerPair request")
|
||||
res, err := hand.lg.UnrevokeIssuerPair(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) ListIssuerPairs(ctx context.Context, req *certmanagercontrol.ListIssuerPairsParams) (*certmanagercontrol.ListIssuerPairsResult, error) {
|
||||
func (hand *Handler) ListIssuerPairs(ctx context.Context, req *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle ListIssuerPairs request")
|
||||
res, err := hand.lg.ListIssuerPairs(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) GetIssuerCertificate(ctx context.Context, req *certmanagercontrol.GetIssuerCertificateParams) (*certmanagercontrol.GetIssuerCertificateResult, error) {
|
||||
func (hand *Handler) GetIssuerCertificate(ctx context.Context, req *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle GetIssuerCertificate request")
|
||||
res, err := hand.lg.GetIssuerCertificate(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) CreateServicePair(ctx context.Context, req *certmanagercontrol.CreateServicePairParams) (*certmanagercontrol.CreateServicePairResult, error) {
|
||||
func (hand *Handler) CreateServicePair(ctx context.Context, req *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle CreateServicePair request")
|
||||
res, err := hand.lg.CreateServicePair(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) RevokeServicePair(ctx context.Context, req *certmanagercontrol.RevokeServicePairParams) (*certmanagercontrol.RevokeServicePairResult, error) {
|
||||
func (hand *Handler) RevokeServicePair(ctx context.Context, req *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle RevokeServicePair request")
|
||||
res, err := hand.lg.RevokeServicePair(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) ListServicePairs(ctx context.Context, req *certmanagercontrol.ListServicePairsParams) (*certmanagercontrol.ListServicePairsResult, error) {
|
||||
func (hand *Handler) ListServicePairs(ctx context.Context, req *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle ListServicePairs request")
|
||||
res, err := hand.lg.ListServicePairs(ctx, req)
|
||||
return res, err
|
||||
}
|
||||
|
||||
func (hand *Handler) GetServicePair(ctx context.Context, req *certmanagercontrol.GetServicePairParams) (*certmanagercontrol.GetServicePairResult, error) {
|
||||
func (hand *Handler) GetServicePair(ctx context.Context, req *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle GetServicePair request")
|
||||
res, err := hand.lg.GetServicePair(ctx, req)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"certmanager/api/certmanagercontrol"
|
||||
"certmanager/pkg/cmctl"
|
||||
"certmanager/internal/logic"
|
||||
"certmanager/pkg/logger"
|
||||
|
||||
@@ -13,7 +13,7 @@ type HandlerConfig struct {
|
||||
}
|
||||
|
||||
type Handler struct {
|
||||
certmanagercontrol.UnimplementedControlServer
|
||||
cmctl.UnimplementedControlServer
|
||||
lg *logic.Logic
|
||||
log *logger.Logger
|
||||
}
|
||||
@@ -27,5 +27,5 @@ func NewHandler(conf *HandlerConfig) *Handler {
|
||||
}
|
||||
|
||||
func (hand *Handler) Register(gsrv *grpc.Server) {
|
||||
certmanagercontrol.RegisterControlServer(gsrv, hand)
|
||||
cmctl.RegisterControlServer(gsrv, hand)
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ package handler
|
||||
import (
|
||||
"context"
|
||||
|
||||
"certmanager/api/certmanagercontrol"
|
||||
"certmanager/pkg/cmctl"
|
||||
)
|
||||
|
||||
func (hand *Handler) GetStatus(ctx context.Context, req *certmanagercontrol.GetStatusParams) (*certmanagercontrol.GetStatusResult, error) {
|
||||
func (hand *Handler) GetStatus(ctx context.Context, req *cmctl.GetStatusParams) (*cmctl.GetStatusResult, error) {
|
||||
var err error
|
||||
hand.log.Debugf("Handle getStatus request")
|
||||
res, err := hand.lg.GetStatus(ctx, req)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
cmapi "certmanager/api/certmanagercontrol"
|
||||
cmapi "certmanager/pkg/cmctl"
|
||||
"certmanager/internal/descriptor"
|
||||
"certmanager/pkg/cm509"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
cmapi "certmanager/api/certmanagercontrol"
|
||||
cmapi "certmanager/pkg/cmctl"
|
||||
"certmanager/internal/descriptor"
|
||||
"certmanager/pkg/cm509"
|
||||
)
|
||||
|
||||
@@ -3,12 +3,12 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
|
||||
"certmanager/api/certmanagercontrol"
|
||||
"certmanager/pkg/cmctl"
|
||||
)
|
||||
|
||||
func (lg *Logic) GetStatus(ctx context.Context, params *certmanagercontrol.GetStatusParams) (*certmanagercontrol.GetStatusResult, error) {
|
||||
func (lg *Logic) GetStatus(ctx context.Context, params *cmctl.GetStatusParams) (*cmctl.GetStatusResult, error) {
|
||||
var err error
|
||||
res := &certmanagercontrol.GetStatusResult{
|
||||
res := &cmctl.GetStatusResult{
|
||||
Message: "Hello",
|
||||
}
|
||||
return res, err
|
||||
|
||||
@@ -233,9 +233,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu internal/test/Makefile'; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign internal/test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu internal/test/Makefile
|
||||
$(AUTOMAKE) --foreign internal/test/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
cmapi "certmanager/api/certmanagercontrol"
|
||||
cmapi "certmanager/pkg/cmctl"
|
||||
"certmanager/internal/config"
|
||||
"certmanager/internal/database"
|
||||
"certmanager/internal/logic"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
cmapi "certmanager/api/certmanagercontrol"
|
||||
cmapi "certmanager/pkg/cmctl"
|
||||
"certmanager/internal/config"
|
||||
"certmanager/internal/database"
|
||||
"certmanager/internal/logic"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"certmanager/api/certmanagercontrol"
|
||||
"certmanager/pkg/cmctl"
|
||||
"certmanager/pkg/auxhttp"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func (hand *Handler) GetStatus(gctx *gin.Context) {
|
||||
var err error
|
||||
nReq := &certmanagercontrol.GetStatusParams{}
|
||||
nReq := &cmctl.GetStatusParams{}
|
||||
// Bind request
|
||||
err = gctx.ShouldBind(nReq)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user