(list []*schema.Resource, err error, filter transaction.Filter)
| 1115 | } |
| 1116 | |
| 1117 | func fetchContextHelper(list []*schema.Resource, err error, filter transaction.Filter) (*schema.Resource, error) { |
| 1118 | if err != nil { |
| 1119 | return nil, fmt.Errorf("Failed to fetch %s: %s", filter, err) |
| 1120 | } |
| 1121 | if len(list) < 1 { |
| 1122 | return nil, transaction.ErrResourceNotFound |
| 1123 | } |
| 1124 | return list[0], nil |
| 1125 | } |
| 1126 | |
| 1127 | func (tx *Transaction) LockFetch(s *schema.Schema, filter transaction.Filter, lockPolicy schema.LockPolicy, options *transaction.ViewOptions) (*schema.Resource, error) { |
| 1128 | return tx.LockFetchContext(context.Background(), s, filter, lockPolicy, options) |
no test coverage detected