Răsfoiți Sursa

Make `MockDB` implement `acme.DB` interface again

Herman Slatman 2 ani în urmă
părinte
comite
ab9e1ddb28
1 a modificat fișierele cu 12 adăugiri și 2 ștergeri
  1. 12 2
      acme/db.go

+ 12 - 2
acme/db.go

@@ -399,12 +399,12 @@ func (m *MockDB) GetOrdersByAccountID(ctx context.Context, accID string) ([]stri
 }
 }
 
 
 // GetDpop retrieves an DPoP from the database.
 // GetDpop retrieves an DPoP from the database.
-func (m *MockDB) GetDpop(ctx context.Context, orderId string) (map[string]interface{}, error) {
+func (m *MockDB) GetDpopToken(ctx context.Context, orderId string) (map[string]interface{}, error) {
 	return nil, errors.New("not implemented")
 	return nil, errors.New("not implemented")
 }
 }
 
 
 // CreateDpop creates DPoP resources and saves them to the DB.
 // CreateDpop creates DPoP resources and saves them to the DB.
-func (m *MockDB) CreateDpop(ctx context.Context, orderId string, dpop map[string]interface{}) error {
+func (m *MockDB) CreateDpopToken(ctx context.Context, orderId string, dpop map[string]interface{}) error {
 	return errors.New("not implemented")
 	return errors.New("not implemented")
 }
 }
 
 
@@ -412,3 +412,13 @@ func (m *MockDB) CreateDpop(ctx context.Context, orderId string, dpop map[string
 func (m *MockDB) GetAllOrdersByAccountID(ctx context.Context, accID string) ([]string, error) {
 func (m *MockDB) GetAllOrdersByAccountID(ctx context.Context, accID string) ([]string, error) {
 	return nil, errors.New("not implemented")
 	return nil, errors.New("not implemented")
 }
 }
+
+// CreateOidcToken creates oidc token resources and saves them to the DB.
+func (m *MockDB) CreateOidcToken(ctx context.Context, orderId string, idToken map[string]interface{}) error {
+	return errors.New("not implemented")
+}
+
+// GetOidcToken retrieves an oidc token from the database.
+func (m *MockDB) GetOidcToken(ctx context.Context, orderId string) (map[string]interface{}, error) {
+	return nil, errors.New("not implemented")
+}