package handler import ( "context" "certmanager/pkg/cmctl" ) func (hand *Handler) SetGrant(ctx context.Context, params *cmctl.SetGrantParams) (*cmctl.SetGrantResult, error) { var err error hand.log.Debugf("Handle SetGrant call") res := &cmctl.SetGrantResult{} accountID, err := hand.Authentificate(ctx) if err != nil { return res, err } res, err = hand.lg.SetGrant(ctx, accountID, params) return res, err } func (hand *Handler) DeleteGrant(ctx context.Context, params *cmctl.DeleteGrantParams) (*cmctl.DeleteGrantResult, error) { var err error hand.log.Debugf("Handle DeleteGrant call") res := &cmctl.DeleteGrantResult{} accountID, err := hand.Authentificate(ctx) if err != nil { return res, err } res, err = hand.lg.DeleteGrant(ctx, accountID, params) return res, err }