(ctx context.Context, gID db.GraphID, salt *db.GraphSalt)
| 117 | } |
| 118 | |
| 119 | func (d *DB) AddGraphSalt(ctx context.Context, gID db.GraphID, salt *db.GraphSalt) error { |
| 120 | id := uuid.NewString() |
| 121 | if err := d.q.AddGraphSalt(ctx, sqlitedb.AddGraphSaltParams{ |
| 122 | ID: id, |
| 123 | GraphID: string(gID), |
| 124 | Value: salt.Value, |
| 125 | ExpiresAt: salt.ExpiredAt, |
| 126 | }); err != nil { |
| 127 | return fmt.Errorf("failed to add graph salt: %w", err) |
| 128 | } |
| 129 | return nil |
| 130 | } |
| 131 | |
| 132 | func (d *DB) GraphSalts(ctx context.Context, id db.GraphID) ([]*db.GraphSalt, error) { |
| 133 | gss, err := d.q.GraphSalts(ctx, string(id)) |
nothing calls this directly
no test coverage detected