(ctx context.Context, id db.GraphID)
| 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)) |
| 164 | if errors.Is(err, sql.ErrNoRows) { |
| 165 | return nil, db.NotExists("graph", id) |
| 166 | } else if err != nil { |
| 167 | return nil, fmt.Errorf("failed to load graph encrypt keys: %w", err) |
| 168 | } |
| 169 | return convSlice(geks, toGraphEncryptKey), nil |
| 170 | } |
| 171 | |
| 172 | func toGraphEncryptKey(g sqlitedb.GraphEncryptKey) *db.GraphEncryptKey { |
| 173 | return &db.GraphEncryptKey{ |
nothing calls this directly
no test coverage detected