(ctx context.Context, allowlistID string, withContent bool)
| 118 | } |
| 119 | |
| 120 | func (c *Client) GetAllowListByID(ctx context.Context, allowlistID string, withContent bool) (*ent.AllowList, error) { |
| 121 | q := c.Ent.AllowList.Query().Where(allowlist.AllowlistIDEQ(allowlistID)) |
| 122 | if withContent { |
| 123 | q = q.WithAllowlistItems() |
| 124 | } |
| 125 | |
| 126 | result, err := q.First(ctx) |
| 127 | if err != nil { |
| 128 | return nil, err |
| 129 | } |
| 130 | |
| 131 | return result, nil |
| 132 | } |
| 133 | |
| 134 | func (c *Client) AddToAllowlist(ctx context.Context, list *ent.AllowList, items []*models.AllowlistItem) (int, error) { |
| 135 | added := 0 |
no test coverage detected