(ctx context.Context)
| 190 | } |
| 191 | |
| 192 | func InstanceAuthToken(ctx context.Context) (string, error) { |
| 193 | elem := ctx.Value(instanceAuthToken) |
| 194 | if elem == nil { |
| 195 | return "", runnerErrors.ErrUnauthorized |
| 196 | } |
| 197 | return elem.(string), nil |
| 198 | } |
| 199 | |
| 200 | func PopulateInstanceContext(ctx context.Context, instance params.Instance, entity params.ForgeEntity, claims *InstanceJWTClaims) context.Context { |
| 201 | ctx = SetInstanceID(ctx, instance.ID) |
no outgoing calls
no test coverage detected