(ctx context.Context, gID db.GraphID, gek *db.GraphEncryptKey)
| 147 | } |
| 148 | |
| 149 | func (d *DB) AddGraphEncryptKey(ctx context.Context, gID db.GraphID, gek *db.GraphEncryptKey) error { |
| 150 | id := uuid.NewString() |
| 151 | if err := d.q.AddGraphEncryptKey(ctx, sqlitedb.AddGraphEncryptKeyParams{ |
| 152 | ID: id, |
| 153 | GraphID: string(gID), |
| 154 | EncryptedPrivateKey: gek.EncryptedPrivateKey, |
| 155 | PublicKey: gek.PublicKey, |
| 156 | }); err != nil { |
| 157 | return fmt.Errorf("failed to add graph encrypt key: %w", err) |
| 158 | } |
| 159 | return nil |
| 160 | } |
| 161 | |
| 162 | func (d *DB) GraphEncryptKeys(ctx context.Context, id db.GraphID) ([]*db.GraphEncryptKey, error) { |
| 163 | geks, err := d.q.GraphEncryptKeys(ctx, string(id)) |
nothing calls this directly
no test coverage detected